The default bug view has changed. See this FAQ.

nsLDAPConnection.cpp fails to build with error C2171: '!' : illegal on operands of type 'void' error C2451: conditional expression of type 'void' is illegal Expressions of type void cannot be converted to other types

VERIFIED FIXED in Thunderbird 15.0

Status

MailNews Core
Backend
P1
blocker
VERIFIED FIXED
5 years ago
5 years ago

People

(Reporter: Philip Chee, Assigned: aceman)

Tracking

Trunk
Thunderbird 15.0
Bug Flags:
in-testsuite -

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(3 attachments, 3 obsolete attachments)

(Reporter)

Description

5 years ago
http://tinderbox.mozilla.org/showlog.cgi?log=SeaMonkey/1337392860.1337400542.13288.gz

nsLDAPConnection.cpp
d:/mozilla-build/python25/python2.5.exe -O e:/builds/slave/comm-cen-trunk-w32/build/mozilla/build/cl.py cl -FonsLDAPConnection.obj -c -D_HAS_EXCEPTIONS=0 -I../../../mozilla/dist/stl_wrappers  -DMOZ_PREF_EXTENSIONS -DMOZ_PSM -DXPCOM_TRANSLATE_NSGM_ENTRY_POINT=1 -DMOZILLA_INTERNAL_API -D_IMPL_NS_COM -DEXPORT_XPT_API -DEXPORT_XPTC_API -D_IMPL_NS_GFX -D_IMPL_NS_WIDGET -DIMPL_XREAPI -DIMPL_NS_NET -DIMPL_THEBES  -DZLIB_INTERNAL -DMOZ_SUITE=1 -DOSTYPE=\"WINNT5.2\" -DOSARCH=WINNT -I../../../mozilla/dist/public/ldap -I/e/builds/slave/comm-cen-trunk-w32/build/ldap/xpcom/src -I. -I../../../mozilla/dist/include -I../../../mozilla/dist/include/nsprpub  -Ie:/builds/slave/comm-cen-trunk-w32/build/objdir/mozilla/dist/include/nspr -Ie:/builds/slave/comm-cen-trunk-w32/build/objdir/mozilla/dist/include/nss        -TP -nologo -W3 -Gy -Fdgenerated.pdb -wd4800  -DNDEBUG -DTRIMMED -Zi -Zi -UDEBUG -DNDEBUG -O1 -Oy -MD            -FI ../../../comm-config.h -DMOZILLA_CLIENT /e/builds/slave/comm-cen-trunk-w32/build/ldap/xpcom/src/nsLDAPConnection.cpp
nsLDAPConnection.cpp

e:/builds/slave/comm-cen-trunk-w32/build/ldap/xpcom/src/nsLDAPConnection.cpp(154) : error C2171: '!' : illegal on operands of type 'void'

e:/builds/slave/comm-cen-trunk-w32/build/ldap/xpcom/src/nsLDAPConnection.cpp(154) : error C2451: conditional expression of type 'void' is illegal

        Expressions of type void cannot be converted to other types

Appears to be caused by: Bug 734847 part 2 - treewide changes resulting from the default-infallibility of hashtables; either remove useless result checks, or use the fallible version of APIs, depending on context, r=jlebar
(Assignee)

Comment 1

5 years ago
I see this on Thunderbird Linux, too.
(Reporter)

Updated

5 years ago
OS: Windows 7 → All
Hardware: x86 → All
(Reporter)

Comment 2

5 years ago
Needs to be fixed in /mailnews as well
Component: LDAP Integration → Backend
QA Contact: ldap-integration → backend
(Assignee)

Comment 3

5 years ago
Created attachment 625397 [details] [diff] [review]
patch for LDAP
Assignee: nobody → acelists
Status: NEW → ASSIGNED
Attachment #625397 - Flags: review?(mbanner)
Attachment #625397 - Flags: feedback?(philip.chee)
(Assignee)

Comment 4

5 years ago
Created attachment 625398 [details] [diff] [review]
patch for Mailnews

Applying both patches makes TB build for me and tests pass. However, I have many --disable flags in mozconfig so maybe I skipped something.
Attachment #625398 - Flags: review?(mbanner)
Attachment #625398 - Flags: feedback?(philip.chee)
(Assignee)

Comment 5

5 years ago
I mean xpcshell tests only and only those that passed before :)

Comment 6

5 years ago
Comment on attachment 625397 [details] [diff] [review]
patch for LDAP

Fixes the build issues and appears to be no problems using from SM side.
Attachment #625397 - Flags: feedback+

Comment 7

5 years ago
Comment on attachment 625398 [details] [diff] [review]
patch for Mailnews

Fixes the build issues and appears to be no problems using from SM side.
Attachment #625398 - Flags: feedback+
Comment on attachment 625398 [details] [diff] [review]
patch for Mailnews

Review of attachment 625398 [details] [diff] [review]:
-----------------------------------------------------------------

::: mailnews/imap/src/nsImapMailFolder.cpp
@@ +6308,5 @@
>    if (myUserName.Equals(ourUserName) || ourUserName.EqualsLiteral(IMAP_ACL_ANYONE_STRING))
>      // if this is setting an ACL for me, cache it in the folder pref flags
>      UpdateACLCache();
>  
> +  return true;

Nit: replace 'ret' by 'false' in the rest if this method.
Severity: normal → blocker
Flags: in-testsuite-
Priority: -- → P1
Target Milestone: --- → Thunderbird 15.0
(Assignee)

Comment 9

5 years ago
Created attachment 625407 [details] [diff] [review]
patch for Mailnews v2
Attachment #625398 - Attachment is obsolete: true
Attachment #625398 - Flags: review?(mbanner)
Attachment #625398 - Flags: feedback?(philip.chee)
Attachment #625407 - Flags: review?(mbanner)
(Reporter)

Comment 10

5 years ago
Comment on attachment 625397 [details] [diff] [review]
patch for LDAP

Review of attachment 625397 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good!

::: ldap/xpcom/src/nsLDAPService.cpp
@@ +240,1 @@
>  

You could get rid of the above blank line while you're at it.
Attachment #625397 - Flags: feedback?(philip.chee) → feedback+
(Reporter)

Comment 11

5 years ago
Geez, Splinter doesn't give enough context:

> -    if (!mServers.Init()) {
> -        NS_ERROR("nsLDAPService::Init: out of memory ");
> -        return NS_ERROR_OUT_OF_MEMORY;
> -    }
> +    mServers.Init();
>  
^^^^^^ delete this blank line.

> -    if (!mConnections.Init()) {
> -        NS_ERROR("nsLDAPService::Init: out of memory ");
> -        return NS_ERROR_OUT_OF_MEMORY;
> -    }
> +    mConnections.Init();
No longer blocks: 734847
(Assignee)

Comment 12

5 years ago
Created attachment 625412 [details] [diff] [review]
patch for LDAP v2
Attachment #625397 - Attachment is obsolete: true
Attachment #625397 - Flags: review?(mbanner)
Attachment #625412 - Flags: review?(mbanner)
(Assignee)

Comment 13

5 years ago
Created attachment 625420 [details] [diff] [review]
patch for Mailnews v3

Adds fix for Lightning.
Attachment #625407 - Attachment is obsolete: true
Attachment #625407 - Flags: review?(mbanner)
Attachment #625420 - Flags: review?(mbanner)

Comment 14

5 years ago
Comment on attachment 625412 [details] [diff] [review]
patch for LDAP v2

stealing review - this looks OK.
Attachment #625412 - Flags: review?(mbanner) → review+

Comment 15

5 years ago
Comment on attachment 625420 [details] [diff] [review]
patch for Mailnews v3

this looks good for a build bustage fix, thx.
Attachment #625420 - Flags: review?(mbanner) → review+
(Assignee)

Comment 16

5 years ago
Thanks!

There is some problem with dependent bugs today...
Blocks: 734847
Keywords: checkin-needed
https://hg.mozilla.org/comm-central/rev/4ba7ab7f9df5
https://hg.mozilla.org/comm-central/rev/a33abb63ee54

Leaving open for now. Will resolve when the tree goes green.
Keywords: checkin-needed
Still broken on Windows.
https://tbpl.mozilla.org/php/getParsedLog.php?id=11892364&tree=Thunderbird-Trunk#error0
(Assignee)

Comment 19

5 years ago
Created attachment 625432 [details] [diff] [review]
patch for Mailnews, nsAbOutlookDirectory.cpp

This escaped me, it probably is not compiled on linux.
It was catched by https://tbpl.mozilla.org/php/getParsedLog.php?id=11892364&tree=Thunderbird-Trunk#error0
Attachment #625432 - Flags: review?(dbienvenu)
(Assignee)

Comment 20

5 years ago
So I did not test this third patch. Can anybody do it?

Updated

5 years ago
Attachment #625432 - Flags: review?(dbienvenu) → review+
(In reply to :aceman from comment #20)
> So I did not test this third patch. Can anybody do it?

Patch works fine on Windows.
Good enough for me. Still leaving open for green.
https://hg.mozilla.org/comm-central/rev/b75d013575ac
All's green now. Thanks for the patches, aceman!
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
V.Fixed
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.