- 05 4月, 2011 6 次提交
-
-
由 Daniel P. Berrange 提交于
A couple of functions were declared using the old style foo() for no-parameters, instead of foo(void) * src/xen/xen_hypervisor.c, tests/testutils.c: Replace () with (void) in some function declarations * m4/virt-compile-warnings.m4: Enable -Wold-style-definition
-
由 Daniel P. Berrange 提交于
* src/internal.h: Define a ATTRIBUTE_NO_RETURN annotation * src/lxc/lxc_container.c: Annotate lxcContainerDummyChild with ATTRIBUTE_NO_RETURN * tests/eventtest.c: Mark async thread as ATTRIBUTE_NO_RETURN * m4/virt-compile-warnings.m4: Enable -Wmissing-noreturn
-
由 Daniel P. Berrange 提交于
Add a couple of missing ATTRIBUTE_FMT_PRINTF annotations * tools/virsh.c, tests/testutils.c: Add printf format attribute * m4/virt-compile-warnings.m4: Enable -Wmissing-format-attribute
-
由 Daniel P. Berrange 提交于
Split the bit acinclude.m4 file into smaller pieces named as m4/virt-XXXXX.m4 * .gitignore: Ignore gettext related files * acinclude.m4: Delete * m4/virt-compile-warnings.m4: Checks for GCC compiler flags * m4/virt-pkgconfig-back-compat.m4: Backcompat check for pkgconfig program
-
由 Daniel P. Berrange 提交于
Remove custom code for checking compiler warnings, using gl_WARN_ADD instead. Don't list all flags ourselves, use gnulib's gl_MANYWARN_ALL_GCC to get all possible GCC flags, then turn off the ones we don't want yet. * acinclude.m4: Rewrite to use gl_WARN_ADD and gl_MANYWARN_ALL_GCC * bootstrap.conf: Add warnings & manywarnings * configure.ac: Switch to gl_WARN_ADD * m4/compiler-flags.m4: Obsoleted by gl_WARN_ADD
-
由 Eric Blake 提交于
Even with -Wuninitialized (which is part of autobuild.sh --enable-compile-warnings=error), gcc does NOT catch this use of an uninitialized variable: { if (cond) goto error; int a = 1; error: printf("%d", a); } which prints 0 (supposing the stack started life wiped) if cond was true. Clang will catch it, but we don't use clang as often. Using gcc -Wjump-misses-init catches it, but also gives false positives: { if (cond) goto error; int a = 1; return a; error: return 0; } Here, a was never used in the scope of the error block, so declaring it after goto is technically fine (and clang agrees). However, given that our HACKING already documents a preference to C89 decl-before-statement, the false positive warning is enough of a prod to comply with HACKING. [Personally, I'd _really_ rather use C99 decl-after-statement to minimize scope, but until gcc can efficiently and reliably catch scoping and uninitialized usage bugs, I'll settle with the compromise of enforcing a coding standard that happens to reject false positives if it can also detect real bugs.] * acinclude.m4 (LIBVIRT_COMPILE_WARNINGS): Add -Wjump-misses-init. * src/util/util.c (__virExec): Adjust offenders. * src/conf/domain_conf.c (virDomainTimerDefParseXML): Likewise. * src/remote/remote_driver.c (doRemoteOpen): Likewise. * src/phyp/phyp_driver.c (phypGetLparNAME, phypGetLparProfile) (phypGetVIOSFreeSCSIAdapter, phypVolumeGetKey) (phypGetStoragePoolDevice) (phypVolumeGetPhysicalVolumeByStoragePool) (phypVolumeGetPath): Likewise. * src/vbox/vbox_tmpl.c (vboxNetworkUndefineDestroy) (vboxNetworkCreate, vboxNetworkDumpXML) (vboxNetworkDefineCreateXML): Likewise. * src/xenapi/xenapi_driver.c (getCapsObject) (xenapiDomainDumpXML): Likewise. * src/xenapi/xenapi_utils.c (createVMRecordFromXml): Likewise. * src/security/security_selinux.c (SELinuxGenNewContext): Likewise. * src/qemu/qemu_command.c (qemuBuildCommandLine): Likewise. * src/qemu/qemu_hotplug.c (qemuDomainChangeEjectableMedia): Likewise. * src/qemu/qemu_process.c (qemuProcessWaitForMonitor): Likewise. * src/qemu/qemu_monitor_text.c (qemuMonitorTextGetPtyPaths): Likewise. * src/qemu/qemu_driver.c (qemudDomainShutdown) (qemudDomainBlockStats, qemudDomainMemoryPeek): Likewise. * src/storage/storage_backend_iscsi.c (virStorageBackendCreateIfaceIQN): Likewise. * src/node_device/node_device_udev.c (udevProcessPCI): Likewise.
-
- 28 7月, 2010 1 次提交
-
-
由 Eric Blake 提交于
This would have detected the bug in commit 38ad33931 (Aug 09), which we missed until commit f828ca35 (Jul 10); over 11 months later. However, on Fedora 13, it also triggers LOTS of warnings from the libcurl-devel header for two files: esx/esx_vi.c: In function 'esxVI_CURL_Perform': esx/esx_vi.c:232: error: logical '&&' with non-zero constant will always evaluate as true [-Wlogical-op] esx/esx_vi.c:232: error: logical '&&' with non-zero constant will always evaluate as true [-Wlogical-op] esx/esx_vi.c:232: error: logical '&&' with non-zero constant will always evaluate as true [-Wlogical-op] ... xenapi/xenapi_driver.c: In function 'call_func': xenapi/xenapi_driver.c:1872: error: logical '&&' with non-zero constant will always evaluate as true [-Wlogical-op] xenapi/xenapi_driver.c:1872: error: logical '&&' with non-zero constant will always evaluate as true [-Wlogical-op] xenapi/xenapi_driver.c:1872: error: logical '&&' with non-zero constant will always evaluate as true [-Wlogical-op] ... libcurl allows to disable the type-checking code that triggers those warnings, along with the reduction in type-safety of calls to some libcurl functions. I figure this is worth the improved compiler checking throughout the rest of libvirt. * acinclude.m4 (--enable-compile-warnings=error): Add -Wlogical-op. * configure.ac: Add -DCURL_DISABLE_TYPECHECK to LIBCURL_CFLAGS to avoid compilation warning. Suggested by Daniel P. Berrange. Tweaked by Matthias Bolte.
-
- 17 5月, 2010 1 次提交
-
-
由 Eric Blake 提交于
Matthias noted that the line: virt_aa_helper_LDFLAGS = $(WARN_CFLAGS) looks inconsistent, so I did an audit. Currently, the set of compiler warning flags passed to gcc as $CC are equally permitted as the set of linker flags passed to gcc as $LD, so there was no problem with that usage. But if we ever get in a situation where $CC and $LD treat particular flags differently, using the right variable form will make it easier. In the process, I spotted a couple of typos that were omitting useful flags, as well as specifying a -l under the wrong variable. * acinclude.m4 (LIBVIRT_COMPILE_WARNINGS): Define WARN_LDFLAGS as an alias for WARN_CFLAGS. * tools/Makefile.am (virsh_LDFLAGS): Use more canonical spelling. * proxy/Makefile.am (libvirt_proxy_LDFLAGS): Likewise. Move library... (libvirt_proxy_LDADD): ...here. * src/Makefile.am (virt_aa_helper_LDFLAGS): Use more canonical spelling of WARN_LDFLAGS. (libvirt_parthelper_LDFLAGS, libvirt_lxc_LDFLAGS): Likewise. Use correct spelling of COVERAGE_LDFLAGS. Reported by Matthias Bolte.
-
- 31 3月, 2010 1 次提交
-
-
由 Eric Blake 提交于
* acinclude.m4 (LIBVIRT_COMPILE_WARNINGS): Add -fdiagnostics-show-option.
-
- 16 7月, 2009 1 次提交
-
-
由 Jim Meyering 提交于
by running this command: git ls-files -z | xargs -0 perl -pi -0777 -e 's/\n\n+$/\n/' This is in preparation for a more strict make syntax-check rule that will detect trailing blank lines.
-
- 14 1月, 2009 1 次提交
-
-
由 John Levon 提交于
-
- 18 12月, 2008 1 次提交
-
-
由 Daniel P. Berrange 提交于
-
- 23 1月, 2008 1 次提交
-
-
由 Daniel P. Berrange 提交于
-
- 07 11月, 2007 1 次提交
-
-
由 Richard W.M. Jones 提交于
Avoid risk of format string abuse (also avoids gcc warnings). * src/util.c (ReportError): Use a literal "%s" format string. * src/remote_internal.c (server_error): Likewise. * src/qemu_conf.c (qemudReportError): Likewise. * acinclude.m4: Add -Wformat -Wformat-security to default list of warning flags, to warn about errors such as the above.
-
- 22 9月, 2007 1 次提交
-
-
由 Daniel P. Berrange 提交于
-
- 07 8月, 2007 1 次提交
-
-
由 Richard W.M. Jones 提交于
* acinclude.m4, configure.in: ./configure option --disable-stack-protector. * src/gnutls_1_0_compat.h: Compatibility with GnuTLS 1.0. * src/bridge.c: If no bridge ioctls, give an error at runtime.
-
- 26 3月, 2007 1 次提交
-
-
由 Daniel Veillard 提交于
user specified CFLAGS Daniel
-
- 21 3月, 2007 2 次提交
-
-
由 Daniel P. Berrange 提交于
-
由 Daniel P. Berrange 提交于
-
- 02 3月, 2007 1 次提交
-
-
由 Mark McLoughlin 提交于
* acinclude.m4: add LIBVIRT_COMPILE_WARNINGS, copied from GNOME but with a few more flags we'd been using. * configure.in: use that instead of setting CFLAGS directly. * proxy/Makefile.am, python/Makefile.am, qemud/Makefile.am, src/Makefile.am, tests/Makefile.am: use $(WARN_CFLAGS)
-