Closed Bug 1165744 Opened 9 years ago Closed 9 years ago

/comm-central/mailnews/news/src/nsNntpService.cpp:732:94: error: expected primary-expression before ‘(’ token if (StringBeginsWith(list[index], NS_LITERAL_CSTRING(kNewsRootURI)))

Categories

(Thunderbird :: Untriaged, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1165737

People

(Reporter: ishikawa, Assigned: ishikawa)

References

Details

Attachments

(1 file)

After refreshing my source a few hours ago, my local C-C source tree could not build thunderbird.

The error was
/comm-central/mailnews/news/src/nsNntpService.cpp:732:94: error: expected primary-expression before ‘(’ token
       if (StringBeginsWith(list[index], NS_LITERAL_CSTRING(kNewsRootURI)))
                 
After checking a few things, I realize this is the change made to NS_LITERAL_CSTRING in
Bug 1155963 - Don't allow NS_NAMED_LITERAL_CSTRING(name, NS_LITERAL_CSTRING("value"))

I needed the attached patch to compile and build TB.

We now define kNewsRootURI as CPP macros.
Surprisingly, other strings defined nsNewsUtils.h did not need
the change, but I am now a little suspicious about why only kNewsRootURI needed this special handling. Other constants seem to be simply compared using basic strcmp() and friends.

At least, the built TB now starts.

TIA
See Also: → 1155963
Attachment #8606768 - Attachment description: nsNewsUtils.h: define kNewsRootURI as preprocess macro. → nsNewsUtils.h: define kNewsRootURI as preprocessor macro.
Attachment #8606768 - Flags: review?(bwinton)
Assignee: nobody → ishikawa
Sorry, but you were too slow - bug 1165737 was filed and resolved to cover this issue.
(In reply to neil@parkwaycc.co.uk from comment #1)
> Sorry, but you were too slow - bug 1165737 was filed and resolved to cover
> this issue.

Yes, I was late :-)
But the bug is fixed. Good.

TIA
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → DUPLICATE
Comment on attachment 8606768 [details] [diff] [review]
nsNewsUtils.h: define  kNewsRootURI as preprocessor macro.

I don't think we need my review here anymore, right?  ;)
Attachment #8606768 - Flags: review?(bwinton)
(In reply to Blake Winton (:bwinton) from comment #3)
> Comment on attachment 8606768 [details] [diff] [review]
> nsNewsUtils.h: define  kNewsRootURI as preprocessor macro.
> 
> I don't think we need my review here anymore, right?  ;)

Right. Sorry, I didn't realize setting status "RESOLVED" and "DUPLICATE" did not reset the review request.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: