Use NS_ENSURE_TRUE_VOID(foo) instead of NS_ENSURE_TRUE(foo, )

RESOLVED FIXED in mozilla20

Status

()

RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: njn, Assigned: njn)

Tracking

(Blocks: 1 bug)

Trunk
mozilla20
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

6 years ago
I just updated my Ubuntu installation to 12.10 and got a new clang, and now I'm getting failures like these:

  /home/njn/moz/mi2/content/media/webm/WebMReader.cpp:1033:74: error: empty macro arguments are a C99 feature [-Werror,-Wc99-extensions]
  NS_ENSURE_TRUE((uint32_t)aSubsegmentIdx < mClusterByteRanges.Length(), );
 
They're errors in some dirs and warnings in others, so there must be some WARNINGS_AS_ERRORS action happening.  (I'm compiling with --enable-warnings-as-errors.)
(Assignee)

Comment 1

6 years ago
Created attachment 695375 [details] [diff] [review]
Use NS_ENSURE_{TRUE,FALSE,SUCCESS}_VOID(foo) instead of NS_ENSURE_{TRUE,FALSE,SUCCESS}(foo, ).

Simple patch.
Attachment #695375 - Flags: review?(tterribe)
(Assignee)

Comment 2

6 years ago
Comment on attachment 695375 [details] [diff] [review]
Use NS_ENSURE_{TRUE,FALSE,SUCCESS}_VOID(foo) instead of NS_ENSURE_{TRUE,FALSE,SUCCESS}(foo, ).

This patch misses some that use /**/ (or varations) as the 2nd arg.  I'll post a new version shortly.
Attachment #695375 - Flags: review?(tterribe)
(Assignee)

Comment 3

6 years ago
Created attachment 695378 [details] [diff] [review]
Use NS_ENSURE_{TRUE,FALSE,SUCCESS}_VOID(foo) instead of NS_ENSURE_{TRUE,FALSE,SUCCESS}(foo, ).

New version that converts the NS_ENSURE_TRUE(foo, /**/) cases too.
Attachment #695378 - Flags: review?(tterribe)
(Assignee)

Updated

6 years ago
Attachment #695375 - Attachment is obsolete: true
Attachment #695378 - Flags: review?(tterribe) → review+
Blocks: 187528
https://hg.mozilla.org/mozilla-central/rev/372d779d8f27
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla20
You need to log in before you can comment on or make changes to this bug.