Closed Bug 756726 Opened 12 years ago Closed 12 years ago

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

Categories

(MailNews Core :: Backend, defect, P1)

defect

Tracking

(Not tracked)

VERIFIED FIXED
Thunderbird 15.0

People

(Reporter: philip.chee, Assigned: aceman)

References

()

Details

Attachments

(3 files, 3 obsolete files)

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
I see this on Thunderbird Linux, too.
OS: Windows 7 → All
Hardware: x86 → All
Needs to be fixed in /mailnews as well
Component: LDAP Integration → Backend
QA Contact: ldap-integration → backend
Attached patch patch for LDAP (obsolete) — Splinter Review
Assignee: nobody → acelists
Status: NEW → ASSIGNED
Attachment #625397 - Flags: review?(mbanner)
Attachment #625397 - Flags: feedback?(philip.chee)
Attached patch patch for Mailnews (obsolete) — Splinter Review
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)
I mean xpcshell tests only and only those that passed before :)
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 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
Attached patch patch for Mailnews v2 (obsolete) — Splinter Review
Attachment #625398 - Attachment is obsolete: true
Attachment #625398 - Flags: review?(mbanner)
Attachment #625398 - Flags: feedback?(philip.chee)
Attachment #625407 - Flags: review?(mbanner)
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+
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
Attachment #625397 - Attachment is obsolete: true
Attachment #625397 - Flags: review?(mbanner)
Attachment #625412 - Flags: review?(mbanner)
Adds fix for Lightning.
Attachment #625407 - Attachment is obsolete: true
Attachment #625407 - Flags: review?(mbanner)
Attachment #625420 - Flags: review?(mbanner)
Comment on attachment 625412 [details] [diff] [review]
patch for LDAP v2

stealing review - this looks OK.
Attachment #625412 - Flags: review?(mbanner) → review+
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+
Thanks!

There is some problem with dependent bugs today...
Blocks: 734847
Keywords: checkin-needed
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)
So I did not test this third patch. Can anybody do it?
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
Closed: 12 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.

Attachment

General

Creator:
Created:
Updated:
Size: