Last Comment Bug 720016 - warning when compiling the maintenance service - swprintf takes a count parameter
: warning when compiling the maintenance service - swprintf takes a count param...
Status: RESOLVED FIXED
:
Product: Toolkit
Classification: Components
Component: Application Update (show other bugs)
: Trunk
: x86_64 Windows 7
: -- normal (vote)
: mozilla12
Assigned To: Robert Strong [:rstrong] (use needinfo to contact me)
:
Mentors:
Depends on:
Blocks: 481815
  Show dependency treegraph
 
Reported: 2012-01-20 14:48 PST by Robert Strong [:rstrong] (use needinfo to contact me)
Modified: 2012-01-23 12:22 PST (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
patch rev1 (1.13 KB, patch)
2012-01-20 14:48 PST, Robert Strong [:rstrong] (use needinfo to contact me)
netzen: review+
Details | Diff | Splinter Review
patch - nits fixed (1.13 KB, patch)
2012-01-22 15:49 PST, Robert Strong [:rstrong] (use needinfo to contact me)
robert.strong.bugs: review+
Details | Diff | Splinter Review

Description Robert Strong [:rstrong] (use needinfo to contact me) 2012-01-20 14:48:58 PST
Created attachment 590358 [details] [diff] [review]
patch rev1

Specifically:
warning C4996: 'swprintf': swprintf has been changed to conform with the ISO C standard, adding an extra character count parameter. To use traditional Microsoft swprintf, set _CRT_NON_CONFORMING_SWPRINTFS.
Comment 1 Brian R. Bondy [:bbondy] 2012-01-20 15:51:26 PST
Comment on attachment 590358 [details] [diff] [review]
patch rev1

Review of attachment 590358 [details] [diff] [review]:
-----------------------------------------------------------------

::: toolkit/components/maintenanceservice/maintenanceservice.cpp
@@ +186,5 @@
>    WCHAR logName[64];
>    wcscpy(path, basePath);
>    if (logNumber <= 0) {
> +    swprintf(logName, sizeof(logName)/sizeof(logName[0]),
> +             L"maintenanceservice.log");

nit: space before and after "/"

@@ +191,3 @@
>    } else {
> +    swprintf(logName, sizeof(logName)/sizeof(logName[0]),
> +             L"maintenanceservice-%d.log", logNumber);

nit: ditto
Comment 2 Robert Strong [:rstrong] (use needinfo to contact me) 2012-01-22 15:49:15 PST
Created attachment 590601 [details] [diff] [review]
patch - nits fixed
Comment 3 Robert Strong [:rstrong] (use needinfo to contact me) 2012-01-22 15:56:54 PST
Pushed to fx-team
https://hg.mozilla.org/integration/fx-team/rev/946022ef981f
Comment 4 Tim Taubert [:ttaubert] 2012-01-23 05:32:11 PST
https://hg.mozilla.org/mozilla-central/rev/946022ef981f
Comment 5 :Ms2ger (⌚ UTC+1/+2) 2012-01-23 11:56:45 PST
Er, ArrayLength?
Comment 6 Brian R. Bondy [:bbondy] 2012-01-23 12:22:02 PST
updater code is a little special

Note You need to log in before you can comment on or make changes to this bug.