xpcom/typelib/xpt/src/xpt_xdr.c - compiler warnings

RESOLVED FIXED in mozilla13

Status

()

RESOLVED FIXED
7 years ago
7 years ago

People

(Reporter: joey, Assigned: froydnj)

Tracking

(Blocks: 1 bug)

unspecified
mozilla13
x86
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [build_warning])

Attachments

(1 attachment, 3 obsolete attachments)

(Reporter)

Description

7 years ago
gcc-4.2 -o xpt_xdr.o -c -fvisibility=hidden -DOSTYPE=\"Darwin10.7.4\" -DOSARCH=Darwin -DEXPORT_XPT_API  -I/mozilla/sandbox/gml/xpcom/typelib/xpt/src -I. -I../../../../dist/include -I../../../../dist/include/nsprpub  -I/mozilla/sandbox/gml/obj-ff-dbg/dist/include/nspr -I/mozilla/sandbox/gml/obj-ff-dbg/dist/include/nss       -fPIC  -Wall -W -Wno-unused -Wpointer-arith -Wdeclaration-after-statement -Wcast-align -W -isysroot /Developer/SDKs/MacOSX10.6.sdk -fno-strict-aliasing -fno-common -pthread -DNO_X11 -pipe  -DDEBUG -D_DEBUG -DTRACING -g   -include ../../../../mozilla-config.h -DMOZILLA_CLIENT -MD -MF .deps/xpt_xdr.pp /mozilla/sandbox/gml/xpcom/typelib/xpt/src/xpt_xdr.c
/mozilla/sandbox/gml/xpcom/typelib/xpt/src/xpt_xdr.c: In function 'XPT_HashTableAdd':
/mozilla/sandbox/gml/xpcom/typelib/xpt/src/xpt_xdr.c:146: warning: cast from pointer to integer of different size
/mozilla/sandbox/gml/xpcom/typelib/xpt/src/xpt_xdr.c: In function 'XPT_HashTableLookup':
/mozilla/sandbox/gml/xpcom/typelib/xpt/src/xpt_xdr.c:162: warning: cast from pointer to integer of different size
/mozilla/sandbox/gml/xpcom/typelib/xpt/src/xpt_xdr.c: In function 'XPT_DoString':
/mozilla/sandbox/gml/xpcom/typelib/xpt/src/xpt_xdr.c:409: warning: signed and unsigned type in conditional expression
/mozilla/sandbox/gml/xpcom/typelib/xpt/src/xpt_xdr.c: In function 'XPT_GetOffsetForAddr':
/mozilla/sandbox/gml/xpcom/typelib/xpt/src/xpt_xdr.c:486: warning: cast from pointer to integer of different size
/mozilla/sandbox/gml/xpcom/typelib/xpt/src/xpt_xdr.c: In function 'XPT_SetOffsetForAddr':
/mozilla/sandbox/gml/xpcom/typelib/xpt/src/xpt_xdr.c:493: warning: cast to pointer from integer of different size
/mozilla/sandbox/gml/xpcom/typelib/xpt/src/xpt_xdr.c: In function 'XPT_SetAddrForOffset':
/mozilla/sandbox/gml/xpcom/typelib/xpt/src/xpt_xdr.c:500: warning: cast to pointer from integer of different size
/mozilla/sandbox/gml/xpcom/typelib/xpt/src/xpt_xdr.c: In function 'XPT_GetAddrForOffset':
/mozilla/sandbox/gml/xpcom/typelib/xpt/src/xpt_xdr.c:506: warning: cast to pointer from integer of different size
(Reporter)

Comment 1

7 years ago
% uname -a
Darwin banshee.local 10.7.4 Darwin Kernel Version 10.7.4: Mon Apr 18 21:24:17 PDT 2011; root:xnu-1504.14.12~3/RELEASE_X86_64 x86_64
Whiteboard: [build_warnings]

Updated

7 years ago
Whiteboard: [build_warnings] → [build_warning]

Updated

7 years ago
Blocks: 187528
(Assignee)

Comment 2

7 years ago
Created attachment 599204 [details] [diff] [review]
patch

Add the obvious casts and break lines where necessary.
Assignee: nobody → nfroyd
Status: NEW → ASSIGNED
Attachment #599204 - Flags: review?(doug.turner)
(Assignee)

Updated

7 years ago
Whiteboard: [build_warning] → [build_warning][autoland-try]

Updated

7 years ago
Whiteboard: [build_warning][autoland-try] → [build_warning][autoland-in-queue]

Comment 3

7 years ago
Autoland Patchset:
	Patches: 599204
	Branch: mozilla-central => try
	Destination: http://hg.mozilla.org/try/pushloghtml?changeset=0ab42f738612
Try run started, revision 0ab42f738612. To cancel or monitor the job, see: https://tbpl.mozilla.org/?tree=Try&rev=0ab42f738612

Comment 4

7 years ago
Try run for 0ab42f738612 is complete.
Detailed breakdown of the results available here:
    https://tbpl.mozilla.org/?tree=Try&rev=0ab42f738612
Results (out of 215 total builds):
    exception: 2
    success: 175
    warnings: 23
    failure: 15
Builds (or logs if builds failed) available at:
http://ftp.mozilla.org/pub/mozilla.org/firefox/try-builds/autolanduser@mozilla.com-0ab42f738612

Updated

7 years ago
Whiteboard: [build_warning][autoland-in-queue] → [build_warning]

Comment 5

7 years ago
I am not sure if casting really fixes the problem.  what is sizeof(intptr_t) on your machine?  64?
(Assignee)

Comment 6

7 years ago
Yeah, 64-bit Linux.  sizeof(intptr_t) == sizeof(void *) everywhere.
(Assignee)

Comment 7

7 years ago
Created attachment 601664 [details] [diff] [review]
patch

Actually, NS_ macros seem like the preferred way to do this.  How about that instead?
Attachment #599204 - Attachment is obsolete: true
Attachment #601664 - Flags: review?(doug.turner)
Attachment #599204 - Flags: review?(doug.turner)

Updated

7 years ago
Attachment #601664 - Flags: review?(doug.turner) → review+

Updated

7 years ago
Keywords: checkin-needed
Backed out due to build barbeque'ing.
https://hg.mozilla.org/integration/mozilla-inbound/rev/7c612d36d3fa

e:/builds/moz2_slave/m-in-w32-dbg/build/xpcom/typelib/xpt/src/xpt_xdr.c(42) : fatal error C1083: Cannot open include file: 'nscore.h': No such file or directory
make[9]: *** [xpt_xdr.obj] Error 2
make[8]: *** [export] Error 2
make[7]: *** [export] Error 2
make[6]: *** [export] Error 2
make[5]: *** [export] Error 2
make[4]: *** [export_tier_platform] Error 2
make[3]: *** [tier_platform] Error 2
make[2]: *** [default] Error 2
make[1]: *** [realbuild] Error 2
make: *** [build] Error 2
(Assignee)

Comment 10

7 years ago
Created attachment 602196 [details] [diff] [review]
patch

Needed to add LOCAL_INCLUDES; -I$(topsrcdir)/xpcom/base for nscore.h and -I..[mumble] for access to xpcom-config.h.
Attachment #601664 - Attachment is obsolete: true
Attachment #602196 - Flags: review?(doug.turner)
Comment on attachment 602196 [details] [diff] [review]
patch

Say what? Surely you don't need to mess with LOCAL_INCLUDES to get nscore.h...
Attachment #602196 - Flags: review?(khuey)
(Assignee)

Comment 12

7 years ago
(In reply to Ms2ger from comment #11)
> Say what? Surely you don't need to mess with LOCAL_INCLUDES to get
> nscore.h...

One would think not.  However, it looks like this is being built during export for the benefit of xpidl--at least that's what I think the makefile says.
(Assignee)

Comment 13

7 years ago
Comment on attachment 602196 [details] [diff] [review]
patch

Doug reviewed the actual code changes already; I think Kyle's n/ack on the Makefile changes is enough
Attachment #602196 - Flags: review?(doug.turner) → review+
Comment on attachment 602196 [details] [diff] [review]
patch

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

Don't add tabs to the makefile please.
Attachment #602196 - Flags: review?(khuey) → review+
(Assignee)

Comment 15

7 years ago
Created attachment 602367 [details] [diff] [review]
patch

No tabs for you!
Attachment #602196 - Attachment is obsolete: true
Attachment #602367 - Flags: review+
(Assignee)

Updated

7 years ago
Whiteboard: [build_warning] → [build_warning][autoland-try:-b do -p all -u all -t none]

Updated

7 years ago
Whiteboard: [build_warning][autoland-try:-b do -p all -u all -t none] → [build_warning][autoland-in-queue]

Comment 16

7 years ago
Autoland Patchset:
	Patches: 602367
	Branch: mozilla-central => try
	Destination: http://hg.mozilla.org/try/pushloghtml?changeset=eca34bb7a667
Try run started, revision eca34bb7a667. To cancel or monitor the job, see: https://tbpl.mozilla.org/?tree=Try&rev=eca34bb7a667

Comment 17

7 years ago
Try run for eca34bb7a667 is complete.
Detailed breakdown of the results available here:
    https://tbpl.mozilla.org/?tree=Try&rev=eca34bb7a667
Results (out of 216 total builds):
    exception: 1
    success: 174
    warnings: 38
    failure: 3
Builds (or logs if builds failed) available at:
http://ftp.mozilla.org/pub/mozilla.org/firefox/try-builds/autolanduser@mozilla.com-eca34bb7a667

Updated

7 years ago
Whiteboard: [build_warning][autoland-in-queue] → [build_warning]
(Assignee)

Updated

7 years ago
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/031cfd3d00f6
Status: ASSIGNED → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla13
You need to log in before you can comment on or make changes to this bug.