"defined"; 1 means "undefined". */
static void set_vbits(UInt *addr, UInt vbits)
{
- VALGRIND_SET_VBITS(addr, &vbits, sizeof(unsigned));
+ (void)VALGRIND_SET_VBITS(addr, &vbits, sizeof(unsigned));
}
static void doit(unsigned vbits, unsigned val)
/* Mark all bytes beyond the null as invalid. */
size_t i;
for (i=len ; i < roundup ; ++i)
- VALGRIND_SET_VBITS(&s_copy[i], &ff, 1);
+ (void)VALGRIND_SET_VBITS(&s_copy[i], &ff, 1);
}
else {
/* Mark the null byte itself as invalid. */
assert(len > 0);
- VALGRIND_SET_VBITS(&s_copy[len-1], &ff, 1);
+ (void)VALGRIND_SET_VBITS(&s_copy[len-1], &ff, 1);
}
result = aligned_strlen(s_copy);
{
int i;
for (i=0 ; i<2 ; ++i) {
- VALGRIND_SET_VBITS(&addr->w64[i], &vbits.w64[i], sizeof(vbits.w64[i]));
+ (void)VALGRIND_SET_VBITS(&addr->w64[i], &vbits.w64[i], sizeof(vbits.w64[i]));
}
}
int main (void)
{
int dfd = open ("/tmp", O_RDONLY);
- int fd1 = openat (dfd, "abc", O_RDONLY);
+ __attribute__((unused)) int fd1 = openat (dfd, "abc", O_RDONLY);
/* This is fine, absolute path. */
- int fd2 = openat (0x12345678, "/tmp/abc", O_RDONLY);
- int fd3 = openat (AT_FDCWD, "abc", O_RDONLY);
+ __attribute__((unused)) int fd2 = openat (0x12345678, "/tmp/abc", O_RDONLY);
+ __attribute__((unused)) int fd3 = openat (AT_FDCWD, "abc", O_RDONLY);
/* This is the only one that should warn. */
- int fd4 = openat (0x12345678, "abc", O_RDONLY);
+ __attribute__((unused)) int fd4 = openat (0x12345678, "abc", O_RDONLY);
return 0;
}