Ignore integer to void* casts warnings in third_party/nss (issue 11438010)

115 views
Skip to first unread message

ba...@adobe.com

unread,
Dec 5, 2012, 4:01:23 AM12/5/12
to ma...@chromium.org, chromium...@chromium.org, mmae...@adobe.com
Reviewers: Mark Mentovai,

Message:
Please review.

Description:
Ignore integer to void* casts warnings.

Please review this at https://codereview.chromium.org/11438010/

SVN Base: http://src.chromium.org/chrome/trunk/deps/third_party/nss/

Affected files:
M nss.gyp


Index: nss.gyp
===================================================================
--- nss.gyp (revision 169374)
+++ nss.gyp (working copy)
@@ -1137,6 +1137,8 @@
'-Wno-switch',
# nss has some `unsigned < 0` checks.
'-Wno-tautological-compare',
+ # nss casts integers to void* for logging.
+ '-Wno-int-to-pointer-cast',
],
},
'cflags': [


ba...@adobe.com

unread,
Dec 5, 2012, 4:25:26 AM12/5/12
to ma...@chromium.org, chromium...@chromium.org, mmae...@adobe.com
Build error being fixed by this patch:

/Users/catalin/projects/chromium/src/third_party/nss/mozilla/security/nss/lib/certhigh/certvfy.c:1219:6:
error: cast to 'void *' from smaller integer type 'unsigned int'
[-Werror,-Wint-to-pointer-cast]
LOG_ERROR(log, cert, 0, flags);

https://codereview.chromium.org/11438010/

ma...@chromium.org

unread,
Dec 5, 2012, 8:27:17 AM12/5/12
to ba...@adobe.com, w...@chromium.org, chromium...@chromium.org, mmae...@adobe.com
Wan-Teh, is this change correct for NSS?

https://codereview.chromium.org/11438010/

w...@chromium.org

unread,
Dec 5, 2012, 7:10:07 PM12/5/12
to ba...@adobe.com, ma...@chromium.org, chromium...@chromium.org, mmae...@adobe.com
badea: could you try this NSS patch? ('PRWord' is a type equivalent to
intptr_t.) Thanks.

Index: third_party/nss/mozilla/security/nss/lib/certhigh/certvfy.c
===================================================================
--- third_party/nss/mozilla/security/nss/lib/certhigh/certvfy.c (revision
171358)
+++ third_party/nss/mozilla/security/nss/lib/certhigh/certvfy.c (working
copy)
@@ -333,14 +333,14 @@

#define LOG_ERROR_OR_EXIT(log,cert,depth,arg) \
if ( log != NULL ) { \
- cert_AddToVerifyLog(log, cert, PORT_GetError(), depth, (void *)arg); \
+ cert_AddToVerifyLog(log, cert, PORT_GetError(), depth, (void
*)(PRWord)arg); \
} else { \
goto loser; \
}

#define LOG_ERROR(log,cert,depth,arg) \
if ( log != NULL ) { \
- cert_AddToVerifyLog(log, cert, PORT_GetError(), depth, (void *)arg); \
+ cert_AddToVerifyLog(log, cert, PORT_GetError(), depth, (void
*)(PRWord)arg); \
}

static SECStatus

https://codereview.chromium.org/11438010/

w...@chromium.org

unread,
Dec 5, 2012, 7:49:59 PM12/5/12
to ba...@adobe.com, ma...@chromium.org, chromium...@chromium.org, mmae...@adobe.com
I verified that patch fixed the compiler warning. I filed an
upstream NSS bug report and attached a polished version of the
patch: https://bugzilla.mozilla.org/show_bug.cgi?id=818741

I can take care of patching Chromium's third_party/nss.

https://codereview.chromium.org/11438010/

ba...@adobe.com

unread,
Dec 6, 2012, 6:56:06 AM12/6/12
to ma...@chromium.org, w...@chromium.org, chromium...@chromium.org, mmae...@adobe.com
On 2012/12/06 00:49:59, wtc wrote:
> I verified that patch fixed the compiler warning. I filed an
> upstream NSS bug report and attached a polished version of the
> patch: https://bugzilla.mozilla.org/show_bug.cgi?id=818741

> I can take care of patching Chromium's third_party/nss.

Great. Thank you.

https://codereview.chromium.org/11438010/
Reply all
Reply to author
Forward
0 new messages