Closed Bug 676442 Opened 13 years ago Closed 13 years ago

Need NSPR_PRINTF_FORMAT macro to warn mistakes in printf format

Categories

(NSPR :: NSPR, defect)

All
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 277394

People

(Reporter: hiro, Assigned: hiro)

Details

Attachments

(1 file, 1 obsolete file)

Attached patch Proposed patch (obsolete) (deleted) — Splinter Review
Like cairo does. http://mxr.mozilla.org/mozilla-central/source/gfx/cairo/cairo/src/cairo-compiler-private.h#109 108 #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4) 109 #define CAIRO_PRINTF_FORMAT(fmt_index, va_index) \ 110 __attribute__((__format__(__printf__, fmt_index, va_index)))
Attachment #550573 - Flags: review?(wtc)
Attached patch Correct position (deleted) — Splinter Review
Apparently NSPR_[PRINTF|SCANF]_FORMAT were in a wrong ifdef block.
Assignee: wtc → hiikezoe
Attachment #550573 - Attachment is obsolete: true
Attachment #550573 - Flags: review?(wtc)
Attachment #550618 - Flags: review?(wtc)
hiro: thank you for the suggestion and the patch. Unfortunately we can't do this because NSPR uses the %ld and %hd integer formats in a nonstandard way.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → DUPLICATE
Attachment #550618 - Flags: review?(wtc) → review-
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: