diff --git a/.gnulib b/.gnulib index 4f01268d0c..097c9ce08a 160000 --- a/.gnulib +++ b/.gnulib @@ -1 +1 @@ -Subproject commit 4f01268d0c584c20704e42527f4fa125e7525aae +Subproject commit 097c9ce08a79899ff942b9b6ee811e613605499f diff --git a/.x-sc_unmarked_diagnostics b/.x-sc_unmarked_diagnostics new file mode 100644 index 0000000000..4135cc7d8c --- /dev/null +++ b/.x-sc_unmarked_diagnostics @@ -0,0 +1,2 @@ +docs/apibuild.py +tests/virt-aa-helper-test diff --git a/cfg.mk b/cfg.mk index 2e7b68ac50..b6b25307af 100644 --- a/cfg.mk +++ b/cfg.mk @@ -71,99 +71,96 @@ useless_free_options = \ # Avoid uses of write(2). Either switch to streams (fwrite), or use # the safewrite wrapper. sc_avoid_write: - @if $(VC_LIST_EXCEPT) | grep '\.c$$' > /dev/null; then \ - grep '\&2; exit 1; } || :; \ - else :; \ - fi + @prohibit='\' \ - msg='use virReportOOMError, not V'IR_ERR_NO_MEMORY \ - $(_prohibit_regexp) + @prohibit='\' \ + halt='use virReportOOMError, not V'IR_ERR_NO_MEMORY \ + $(_sc_search_regexp) +# Use a subshell for each function, to give the optimal warning message. include $(srcdir)/Makefile.nonreentrant sc_prohibit_nonreentrant: @fail=0 ; \ for i in $(NON_REENTRANT) ; \ do \ - grep --before 2 --after 1 -nE "\<$$i\>[:space:]*\(" $$($(VC_LIST_EXCEPT)) && \ - fail=1 && echo "$(ME): use $${i}_r, not $${i}" || : ; \ + (prohibit="\\<$$i *\\(" \ + halt="use $${i}_r, not $$i" \ + $(_sc_search_regexp) \ + ) || fail=1; \ done ; \ exit $$fail # Prohibit the inclusion of . sc_prohibit_ctype_h: - @grep -E '^# *include *' $$($(VC_LIST_EXCEPT)) && \ - { echo "$(ME): don't use ctype.h; instead, use c-ctype.h" \ - 1>&2; exit 1; } || : + @prohibit='^# *include *' \ + halt="don't use ctype.h; instead, use c-ctype.h" \ + $(_sc_search_regexp) # Ensure that no C source file uses TABs for indentation. # Also match *.h.in files, to get libvirt.h.in. # Exclude files in gnulib, since they're imported. sc_TAB_in_indentation: - @grep -lE '^ * ' /dev/null \ - $$($(VC_LIST_EXCEPT) \ - | grep -E '\.(rng|[ch](\.in)?)$$' \ - | grep -v '^gnulib/') && \ - { echo '$(ME): found TAB(s) used for indentation in C sources;'\ - 'use spaces' 1>&2; exit 1; } || : + @prohibit='^ * ' \ + in_vc_files='\.(rng|[ch](\.in)?)$$' \ + halt='use spaces, not TAB, for indentation in C sources' \ + $(_sc_search_regexp) ctype_re = isalnum|isalpha|isascii|isblank|iscntrl|isdigit|isgraph|islower\ |isprint|ispunct|isspace|isupper|isxdigit|tolower|toupper sc_avoid_ctype_macros: - @grep -E '\b($(ctype_re)) *\(' /dev/null \ - $$($(VC_LIST_EXCEPT)) && \ - { echo "$(ME): don't use ctype macros (use c-ctype.h)" \ - 1>&2; exit 1; } || : + @prohibit='\b($(ctype_re)) *\(' \ + halt="don't use ctype macros (use c-ctype.h)" \ + $(_sc_search_regexp) sc_prohibit_virBufferAdd_with_string_literal: - @re='\&2; \ exit 1; } || : @@ -272,22 +269,14 @@ sc_preprocessor_indentation: echo '$(ME): skipping test $@: cppi not installed' 1>&2; \ fi -_m1 = use "test C1 && test C2", not "test C1 -''a C2" -_m2 = use "test C1 || test C2", not "test C1 -''o C2" -# Using test's -a and -o operators is not portable. -sc_prohibit_test_minus_ao: - @re='(\&2; \ - exit 1; } || : - @$(VC_LIST_EXCEPT) | xargs grep -ni 'copyright [^(].*Red 'Hat \ - && { echo '$(ME): consistently use (C) in Red Hat copyright' 1>&2; \ - exit 1; } || : + @require='Copyright .*Red 'Hat', Inc\.' \ + containing='Copyright .*Red 'Hat \ + halt='Red Hat copyright is missing Inc.' \ + $(_sc_search_regexp) + @prohibit='Copyright [^(].*Red 'Hat \ + halt='consistently use (C) in Red Hat copyright' \ + $(_sc_search_regexp) # We don't use this feature of maint.mk. prev_version_file = /dev/null diff --git a/tests/object-locking.ml b/tests/object-locking.ml index 1fddd5183b..ce3b401841 100644 --- a/tests/object-locking.ml +++ b/tests/object-locking.ml @@ -1,7 +1,7 @@ (* * Analyse libvirt driver API methods for mutex locking mistakes * - * Copyright (C) 2008-2010 Red Hat, Inc + * Copyright (C) 2008-2010 Red Hat, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/tools/virt-pki-validate.in b/tools/virt-pki-validate.in index 72ed9e5539..ee7b79d5d7 100755 --- a/tools/virt-pki-validate.in +++ b/tools/virt-pki-validate.in @@ -297,7 +297,7 @@ Alternatively report bugs to your software distributor / vendor. =head1 COPYRIGHT -Copyright (C) 2006-2009 by Red Hat, Inc +Copyright (C) 2006-2010 by Red Hat, Inc. =head1 LICENSE diff --git a/tools/virt-xml-validate.in b/tools/virt-xml-validate.in index a296c7ff05..54d045c2a6 100644 --- a/tools/virt-xml-validate.in +++ b/tools/virt-xml-validate.in @@ -134,7 +134,7 @@ Alternatively report bugs to your software distributor / vendor. =head1 COPYRIGHT -Copyright (C) 2009 by Red Hat, Inc +Copyright (C) 2009-2010 by Red Hat, Inc. Copyright (C) 2009 by Daniel P. Berrange =head1 LICENSE