From: Michael Stapelberg Date: Tue, 9 Oct 2012 12:08:14 +0000 (+0200) Subject: Fix warning: exclude NULL parameters from format string (Thanks knopwob) X-Git-Tag: 4.4~60 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=3528d991757df223b7310e7891205122967da794;p=i3%2Fi3 Fix warning: exclude NULL parameters from format string (Thanks knopwob) --- diff --git a/generate-command-parser.pl b/generate-command-parser.pl index f69f715e..66e44b6c 100755 --- a/generate-command-parser.pl +++ b/generate-command-parser.pl @@ -158,7 +158,6 @@ for my $state (@keys) { $fmt =~ s/$_/%d/g for @keys; $fmt =~ s/\$([a-z_]+)/%s/g; $fmt =~ s/\&([a-z_]+)/%ld/g; - $fmt =~ s/NULL/%s/g; $fmt =~ s/"([a-z0-9_]+)"/%s/g; $fmt =~ s/(?:-?|\b)[0-9]+\b/%d/g; @@ -177,6 +176,7 @@ for my $state (@keys) { $cmd =~ s/[^(]+\(//; $cmd =~ s/\)$//; $cmd = ", $cmd" if length($cmd) > 0; + $cmd =~ s/, NULL//g; say $callfh qq| fprintf(stderr, "$fmt\\n"$cmd);|; # The cfg_criteria functions have side-effects which are important for # testing. They are implemented as stubs in the test parser code.