RESOLVED FIXED 161606
"Redundant argument in sprintf" warning spam from prepare-ChangeLog
https://bugs.webkit.org/show_bug.cgi?id=161606
Summary "Redundant argument in sprintf" warning spam from prepare-ChangeLog
Michael Catanzaro
Reported 2016-09-05 09:10:29 PDT
I've been seeing this warning spam from prepare-ChangeLog for a year or so now: $ prepare-ChangeLog Running status to find changed, added, or removed files. Redundant argument in sprintf at /home/mcatanzaro/src/WebKit/Tools/Scripts/prepare-ChangeLog line 2342, <STAT> line 2. Redundant argument in sprintf at /home/mcatanzaro/src/WebKit/Tools/Scripts/prepare-ChangeLog line 2342, <STAT> line 3. Redundant argument in sprintf at /home/mcatanzaro/src/WebKit/Tools/Scripts/prepare-ChangeLog line 2342, <STAT> line 4. Redundant argument in sprintf at /home/mcatanzaro/src/WebKit/Tools/Scripts/prepare-ChangeLog line 2342, <STAT> line 5. Redundant argument in sprintf at /home/mcatanzaro/src/WebKit/Tools/Scripts/prepare-ChangeLog line 2342, <STAT> line 6. Redundant argument in sprintf at /home/mcatanzaro/src/WebKit/Tools/Scripts/prepare-ChangeLog line 2342, <STAT> line 7. Redundant argument in sprintf at /home/mcatanzaro/src/WebKit/Tools/Scripts/prepare-ChangeLog line 2342, <STAT> line 8. Redundant argument in sprintf at /home/mcatanzaro/src/WebKit/Tools/Scripts/prepare-ChangeLog line 2342, <STAT> line 9. Redundant argument in sprintf at /home/mcatanzaro/src/WebKit/Tools/Scripts/prepare-ChangeLog line 2342, <STAT> line 10. Redundant argument in sprintf at /home/mcatanzaro/src/WebKit/Tools/Scripts/prepare-ChangeLog line 2342, <STAT> line 11.
Attachments
Patch (1.49 KB, patch)
2016-09-05 09:21 PDT, Michael Catanzaro
no flags
Patch (2.28 KB, patch)
2016-09-05 11:48 PDT, Michael Catanzaro
no flags
Patch (2.28 KB, patch)
2016-09-06 07:47 PDT, Michael Catanzaro
darin: review+
commit-queue: commit-queue-
Michael Catanzaro
Comment 1 2016-09-05 09:21:22 PDT
Darin Adler
Comment 2 2016-09-05 09:50:13 PDT
Comment on attachment 287966 [details] Patch This change looks wrong. The argument is extraneous for some cases, and in that case it seems perl warns, but it is needed for others: $svn{A}, $svn{R}, $git{C} and $git{R}.
Michael Catanzaro
Comment 3 2016-09-05 11:45:50 PDT
You're right. I tested $git{"A"} because I was confused by the Perl and wanted to make sure I wasn't breaking anything, but that was dumb as it was the only git case that didn't use the extra format argument. I tried moving the sprintf instead and it seems to work, though maybe there's a better Perl way to write this.
Michael Catanzaro
Comment 4 2016-09-05 11:48:02 PDT
Darin Adler
Comment 5 2016-09-05 12:57:57 PDT
Comment on attachment 287971 [details] Patch OK.
WebKit Commit Bot
Comment 6 2016-09-05 17:05:05 PDT
Comment on attachment 287971 [details] Patch Clearing flags on attachment: 287971 Committed r205461: <http://trac.webkit.org/changeset/205461>
WebKit Commit Bot
Comment 7 2016-09-05 17:05:09 PDT
All reviewed patches have been landed. Closing bug.
WebKit Commit Bot
Comment 8 2016-09-06 07:30:29 PDT
Re-opened since this is blocked by bug 161628
Michael Catanzaro
Comment 9 2016-09-06 07:45:03 PDT
The problem with the patch I landed: I failed to test the simple case of modifying an existing file. In that case, $original is unset. That's why the existing code checks if $original is defined when creating the lookup table. In the case of git, we know if there's no $original file then it wasn't copied or renamed, so we don't need to add it to the lookup table.
Michael Catanzaro
Comment 10 2016-09-06 07:47:30 PDT
Michael Catanzaro
Comment 11 2016-09-06 07:49:50 PDT
(In reply to comment #9) > The problem with the patch I landed: I failed to test the simple case of > modifying an existing file. It raises the question of how I managed to generate the changelog for that commit. I think I just copy/pasted it from the original patch instead of running prepare-ChangeLog to do it. Dumb!
WebKit Commit Bot
Comment 12 2016-09-06 09:03:54 PDT
Comment on attachment 288023 [details] Patch Rejecting attachment 288023 [details] from commit-queue. Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.webkit.org', '--bot-id=webkit-cq-02', 'land-attachment', '--force-clean', '--non-interactive', '--parent-command=commit-queue', 288023, '--port=mac']" exit_code: 2 cwd: /Volumes/Data/EWS/WebKit Last 500 characters of output: /git.webkit.org/WebKit 43eeed4..0e0ce3b master -> origin/master Partial-rebuilding .git/svn/refs/remotes/origin/master/.rev_map.268f45cc-cd09-0410-ab3c-d52691b4dbfc ... Currently at 205478 = 43eeed4fd35fabe64d8a06905563b2842a8fcfb6 r205479 = 0e0ce3b1bc1b1d4bf8aeef66fbc3e592ccd9aa43 Done rebuilding .git/svn/refs/remotes/origin/master/.rev_map.268f45cc-cd09-0410-ab3c-d52691b4dbfc First, rewinding head to replay your work on top of it... Fast-forwarded master to refs/remotes/origin/master. Full output: http://webkit-queues.webkit.org/results/2018313
Michael Catanzaro
Comment 13 2016-09-06 09:26:03 PDT
Note You need to log in before you can comment on or make changes to this bug.