From 3528d991757df223b7310e7891205122967da794 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Tue, 9 Oct 2012 14:08:14 +0200 Subject: [PATCH] Fix warning: exclude NULL parameters from format string (Thanks knopwob) --- generate-command-parser.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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. -- 2.39.2