aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorEric Blake <eblake@redhat.com>2012-09-05 11:40:31 -0600
committerEric Blake <eblake@redhat.com>2012-09-05 12:05:55 -0600
commitc579d6b3d627dc01c448b6de4d9a88b0be90ffae (patch)
treec8b0af5b8cb5ec8ad626cbf5a69c9c19341e2928 /docs
parentqemu: don't pin all the cpus (diff)
downloadlibvirt-c579d6b3d627dc01c448b6de4d9a88b0be90ffae.tar.gz
libvirt-c579d6b3d627dc01c448b6de4d9a88b0be90ffae.tar.bz2
libvirt-c579d6b3d627dc01c448b6de4d9a88b0be90ffae.zip
build: avoid warnings from gcc 4.2.1
OpenBSD ships with gcc 4.2.1, which annoyingly treats all format strings as though they were also attribute((nonnull)). The two concepts are orthogonal, though, as evidenced by the number of spurious warnings it generates on uses where we know that virReportError specifically handles NULL instead of a format string; worse, since we now force -Werror on git builds, it prevents development builds on OpenBSD. I hate to do this, as it disables ALL format checking on older gcc, and therefore misses out on some useful checks (code that happened to compile on Linux may still have type mismatches when compiled on other platforms, as evidenced by the number of times I have fixed formatting mismatches for uid_t as found by warnings on Cygwin), but I don't see any other way to keep -Werror alive and still compile on OpenBSD. A more invasive change would be to make virReportError() mark its format attribute as nonnull, and fix (a lot of) fallout; we may end up doing that anyways as part of danpb's error refactoring improvements, but not today. * src/internal.h (ATTRIBUTE_FMT_PRINTF): Use preferred spellings. * m4/virt-compile-warnings.m4 (-Wformat): Disable on older gcc.
Diffstat (limited to 'docs')
0 files changed, 0 insertions, 0 deletions