The default bug view has changed. See this FAQ.

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

RESOLVED FIXED in mozilla12

Status

()

Toolkit
Application Update
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: rstrong, Assigned: rstrong)

Tracking

Trunk
mozilla12
x86_64
Windows 7
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

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.
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+
Created attachment 590601 [details] [diff] [review]
patch - nits fixed
Attachment #590358 - Attachment is obsolete: true
Attachment #590601 - Flags: 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
Last Resolved: 5 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.