diff options
author | Michael Stapelberg <michael@stapelberg.de> | 2012-10-09 14:08:14 +0200 |
---|---|---|
committer | Michael Stapelberg <michael@stapelberg.de> | 2012-10-09 14:09:12 +0200 |
commit | 3528d991757df223b7310e7891205122967da794 (patch) | |
tree | a297905abec5be25b82a6760706acfcdf990e218 /generate-command-parser.pl | |
parent | 00ac2c4c9c51dc9012016fd839b9f2d8fcbad971 (diff) | |
download | i3-3528d991757df223b7310e7891205122967da794.tar.gz i3-3528d991757df223b7310e7891205122967da794.zip |
Fix warning: exclude NULL parameters from format string (Thanks knopwob)
Diffstat (limited to 'generate-command-parser.pl')
-rwxr-xr-x | generate-command-parser.pl | 2 |
1 files changed, 1 insertions, 1 deletions
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. |