aboutsummaryrefslogtreecommitdiff
path: root/generate-command-parser.pl
diff options
context:
space:
mode:
authorMichael Stapelberg <michael@stapelberg.de>2012-10-09 14:08:14 +0200
committerMichael Stapelberg <michael@stapelberg.de>2012-10-09 14:09:12 +0200
commit3528d991757df223b7310e7891205122967da794 (patch)
treea297905abec5be25b82a6760706acfcdf990e218 /generate-command-parser.pl
parent00ac2c4c9c51dc9012016fd839b9f2d8fcbad971 (diff)
downloadi3-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-xgenerate-command-parser.pl2
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.