On 03/29/2012 09:51 AM, Daniel P. Berrange wrote:
From: "Daniel P. Berrange" <berrange(a)redhat.com>
The code is splattered with a mix of
sizeof foo
sizeof (foo)
sizeof(foo)
Standardize on sizeof(foo) and add a syntax check rule to
enforce it
We might also want to document our policy on 'return 0' and 'sizeof(v)'
in HACKING.
---
cfg.mk | 4 +
+++ b/cfg.mk
@@ -813,3 +813,7 @@ exclude_file_name_regexp--sc_trailing_blank = \.(fig|gif|ico|png)$$
exclude_file_name_regexp--sc_unmarked_diagnostics = \
^(docs/apibuild.py|tests/virt-aa-helper-test)$$
+
+exclude_file_name_regexp--sc_size_of_brackets = cfg.mk
+
+exclude_file_name_regexp--sc_const_long_option = tools/virt-host-validate.c
diff --git a/daemon/libvirtd.c b/daemon/libvirtd.c
Where's the new rule that actually adds the syntax check?
The rest of the patch looks mechanical, but we have to get the cfg.mk
part right. I'm also still looking into the report of why cfg.mk
doesn't seem to be working in relation to the latest per-line exceptions
added to gnulib's syntax-check framework.
--
Eric Blake eblake(a)redhat.com +1-919-301-3266
Libvirt virtualization library
http://libvirt.org