Re: [PATCH 6/7] cfg.mk: drop redundant sc_size_of_brackets

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 08/03/2016 12:20 PM, Ján Tomko wrote:
This check forbids a space after sizeof, which is already done
by check-spacing.pl.
---
  build-aux/check-spacing.pl | 2 +-
  cfg.mk                     | 6 ------
  2 files changed, 1 insertion(+), 7 deletions(-)

diff --git a/build-aux/check-spacing.pl b/build-aux/check-spacing.pl
index 448acf2..afc7758 100755
--- a/build-aux/check-spacing.pl
+++ b/build-aux/check-spacing.pl
@@ -94,7 +94,7 @@ foreach my $file (@ARGV) {
              if ($kw =~ /^(?:if|for|while|switch|return)$/) {
                  $tmpdata =~ s/(?:$kw\s\()/XXX(/;
              } else {
-                print "Whitespace after non-keyword:\n";
+                print "Whitespace after non-keyword or sizeof:\n";
                  print "$file:$.: $line";
                  $ret = 1;
                  last;

The problem is that check-spacing.pl doesn't check for "sizeof blah", which is one of the things prohibited by sc_sizeof_brackets.

So NACK on this one.

diff --git a/cfg.mk b/cfg.mk
index 9f236c2..3405c9a 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -476,12 +476,6 @@ sc_forbid_const_pointer_typedef:
  	halt='use correct style and type for Ptr typedefs'		\
  	  $(_sc_search_regexp)
-# Forbid sizeof foo or sizeof (foo), require sizeof(foo)
-sc_size_of_brackets:
-	@prohibit='sizeof\s'						\
-	halt='use sizeof(foo), not sizeof (foo) or sizeof foo'		\
-	  $(_sc_search_regexp)
-
  # Ensure that no C source file, docs, or rng schema uses TABs for
  # indentation.  Also match *.h.in files, to get libvirt.h.in.  Exclude
  # files in gnulib, since they're imported.


--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]