Closed Bug 226011 Opened 21 years ago Closed 21 years ago

annoying warning in nsGREDirServiceProvider::GetFile

Categories

(Core Graveyard :: Embedding: GRE Core, defect)

defect
Not set
trivial

Tracking

(Not tracked)

RESOLVED FIXED
mozilla1.6beta

People

(Reporter: axel, Assigned: benjamin)

Details

Attachments

(1 file)

nsresult rv = NS_ERROR_FAILURE;
...
  if(strcmp(prop, NS_GRE_DIR) == 0)
  {
    rv = GRE_GetGREDirectory(getter_AddRefs(localFile));
  }    
  
  NS_ENSURE_SUCCESS(rv, rv);

creates a lot of annoying warnings.

The rv decleration and handling should be probably inside the if alltogether.
Yeah, I got a little to NS_ENSURE-happy there...

--BDS
Attachment #135755 - Flags: review?(dougt)
Doug, I would really like to get this in for beta... it's not a critical
crasher, but anyone who builds a debug build from source would see these
warnings constantly.
Flags: blocking1.6b?
Comment on attachment 135755 [details] [diff] [review]
Remove the bogus warning

do you even need the "nsresult rv".  You probably can just:

return GRE_GetGREDirectory(...);
Attachment #135755 - Flags: review?(dougt) → review+
Attachment #135755 - Flags: approval1.6b?
Comment on attachment 135755 [details] [diff] [review]
Remove the bogus warning

a=mkaply
Attachment #135755 - Flags: approval1.6b? → approval1.6b+
Fixed with a bustage fix: my system allowed me to cast from nsIFile** to
nsILocalFile** but it's bad, so I had to introduce a nsILocalFile* local var.

--BDS
Status: NEW → RESOLVED
Closed: 21 years ago
Flags: blocking1.6b?
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.6beta
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: