Last Comment Bug 756726 - 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
: nsLDAPConnection.cpp fails to build with error C2171: '!' : illegal on operan...
Status: VERIFIED FIXED
:
Product: MailNews Core
Classification: Components
Component: Backend (show other bugs)
: Trunk
: All All
: P1 blocker (vote)
: Thunderbird 15.0
Assigned To: :aceman
:
Mentors:
http://tinderbox.mozilla.org/showlog....
Depends on:
Blocks: 734847
  Show dependency treegraph
 
Reported: 2012-05-18 21:43 PDT by Philip Chee
Modified: 2012-05-19 16:23 PDT (History)
9 users (show)
bugzillamozillaorg_serge_20140323: in‑testsuite-
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
patch for LDAP (1.90 KB, patch)
2012-05-19 04:54 PDT, :aceman
philip.chee: feedback+
iann_bugzilla: feedback+
Details | Diff | Splinter Review
patch for Mailnews (8.48 KB, patch)
2012-05-19 05:22 PDT, :aceman
iann_bugzilla: feedback+
Details | Diff | Splinter Review
patch for Mailnews v2 (9.34 KB, patch)
2012-05-19 07:49 PDT, :aceman
no flags Details | Diff | Splinter Review
patch for LDAP v2 (1.90 KB, patch)
2012-05-19 08:37 PDT, :aceman
mozilla: review+
Details | Diff | Splinter Review
patch for Mailnews v3 (10.17 KB, patch)
2012-05-19 09:30 PDT, :aceman
mozilla: review+
Details | Diff | Splinter Review
patch for Mailnews, nsAbOutlookDirectory.cpp (1.07 KB, patch)
2012-05-19 12:32 PDT, :aceman
mozilla: review+
Details | Diff | Splinter Review

Description Philip Chee 2012-05-18 21:43:42 PDT
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
Comment 1 :aceman 2012-05-19 04:26:17 PDT
I see this on Thunderbird Linux, too.
Comment 2 Philip Chee 2012-05-19 04:48:45 PDT
Needs to be fixed in /mailnews as well
Comment 3 :aceman 2012-05-19 04:54:16 PDT
Created attachment 625397 [details] [diff] [review]
patch for LDAP
Comment 4 :aceman 2012-05-19 05:22:29 PDT
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.
Comment 5 :aceman 2012-05-19 05:23:41 PDT
I mean xpcshell tests only and only those that passed before :)
Comment 6 Ian Neal 2012-05-19 07:06:46 PDT
Comment on attachment 625397 [details] [diff] [review]
patch for LDAP

Fixes the build issues and appears to be no problems using from SM side.
Comment 7 Ian Neal 2012-05-19 07:07:05 PDT
Comment on attachment 625398 [details] [diff] [review]
patch for Mailnews

Fixes the build issues and appears to be no problems using from SM side.
Comment 8 Serge Gautherie (:sgautherie) 2012-05-19 07:17:37 PDT
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.
Comment 9 :aceman 2012-05-19 07:49:38 PDT
Created attachment 625407 [details] [diff] [review]
patch for Mailnews v2
Comment 10 Philip Chee 2012-05-19 08:19:05 PDT
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.
Comment 11 Philip Chee 2012-05-19 08:20:46 PDT
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();
Comment 12 :aceman 2012-05-19 08:37:04 PDT
Created attachment 625412 [details] [diff] [review]
patch for LDAP v2
Comment 13 :aceman 2012-05-19 09:30:33 PDT
Created attachment 625420 [details] [diff] [review]
patch for Mailnews v3

Adds fix for Lightning.
Comment 14 David :Bienvenu 2012-05-19 11:01:57 PDT
Comment on attachment 625412 [details] [diff] [review]
patch for LDAP v2

stealing review - this looks OK.
Comment 15 David :Bienvenu 2012-05-19 11:03:01 PDT
Comment on attachment 625420 [details] [diff] [review]
patch for Mailnews v3

this looks good for a build bustage fix, thx.
Comment 16 :aceman 2012-05-19 11:07:23 PDT
Thanks!

There is some problem with dependent bugs today...
Comment 17 Ryan VanderMeulen [:RyanVM] 2012-05-19 11:28:34 PDT
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.
Comment 18 Ryan VanderMeulen [:RyanVM] 2012-05-19 12:22:18 PDT
Still broken on Windows.
https://tbpl.mozilla.org/php/getParsedLog.php?id=11892364&tree=Thunderbird-Trunk#error0
Comment 19 :aceman 2012-05-19 12:32:26 PDT
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
Comment 20 :aceman 2012-05-19 12:35:14 PDT
So I did not test this third patch. Can anybody do it?
Comment 21 Frank Wein [:mcsmurf] 2012-05-19 13:17:16 PDT
(In reply to :aceman from comment #20)
> So I did not test this third patch. Can anybody do it?

Patch works fine on Windows.
Comment 22 Ryan VanderMeulen [:RyanVM] 2012-05-19 13:27:58 PDT
Good enough for me. Still leaving open for green.
https://hg.mozilla.org/comm-central/rev/b75d013575ac
Comment 23 Ryan VanderMeulen [:RyanVM] 2012-05-19 15:55:46 PDT
All's green now. Thanks for the patches, aceman!
Comment 24 Serge Gautherie (:sgautherie) 2012-05-19 16:23:57 PDT
V.Fixed

Note You need to log in before you can comment on or make changes to this bug.