Closed Bug 720016 Opened 8 years ago Closed 8 years ago

warning when compiling the maintenance service - swprintf takes a count parameter

Categories

(Toolkit :: Application Update, defect)

x86_64
Windows 7
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla12

People

(Reporter: rstrong, Assigned: rstrong)

References

Details

Attachments

(1 file, 1 obsolete file)

Attached patch patch rev1 (obsolete) — Splinter Review
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.
Attachment #590358 - Flags: review?(netzen)
Assignee: nobody → robert.bugzilla
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
Attachment #590358 - Flags: review?(netzen) → review+
Pushed to fx-team
https://hg.mozilla.org/integration/fx-team/rev/946022ef981f
Blocks: 481815
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → mozilla12
https://hg.mozilla.org/mozilla-central/rev/946022ef981f
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Er, ArrayLength?
updater code is a little special
You need to log in before you can comment on or make changes to this bug.