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

RESOLVED DUPLICATE of bug 1165737

Status

RESOLVED DUPLICATE of bug 1165737
3 years ago
3 years ago

People

(Reporter: ishikawa, Assigned: ishikawa)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

3 years ago
Created attachment 8606768 [details] [diff] [review]
nsNewsUtils.h: define  kNewsRootURI as preprocessor macro.

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
(Assignee)

Updated

3 years ago
See Also: → bug 1155963
(Assignee)

Updated

3 years ago
Attachment #8606768 - Attachment description: nsNewsUtils.h: define kNewsRootURI as preprocess macro. → nsNewsUtils.h: define kNewsRootURI as preprocessor macro.
Attachment #8606768 - Flags: review?(bwinton)
(Assignee)

Updated

3 years ago
Assignee: nobody → ishikawa

Comment 1

3 years ago
Sorry, but you were too slow - bug 1165737 was filed and resolved to cover this issue.
(Assignee)

Comment 2

3 years ago
(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
Last Resolved: 3 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1165737
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)
(Assignee)

Comment 4

3 years ago
(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.