Closed Bug 666612 Opened 13 years ago Closed 12 years ago

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

Categories

(Core :: XPCOM, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla13

People

(Reporter: joey, Assigned: froydnj)

References

(Blocks 1 open bug)

Details

(Whiteboard: [build_warning])

Attachments

(1 file, 3 obsolete files)

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
% 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]
Whiteboard: [build_warnings] → [build_warning]
Blocks: buildwarning
Attached patch patch (obsolete) — Splinter Review
Add the obvious casts and break lines where necessary.
Assignee: nobody → nfroyd
Status: NEW → ASSIGNED
Attachment #599204 - Flags: review?(doug.turner)
Whiteboard: [build_warning] → [build_warning][autoland-try]
Whiteboard: [build_warning][autoland-try] → [build_warning][autoland-in-queue]
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
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
Whiteboard: [build_warning][autoland-in-queue] → [build_warning]
I am not sure if casting really fixes the problem.  what is sizeof(intptr_t) on your machine?  64?
Yeah, 64-bit Linux.  sizeof(intptr_t) == sizeof(void *) everywhere.
Attached patch patch (obsolete) — Splinter Review
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)
Attachment #601664 - Flags: review?(doug.turner) → review+
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
Attached patch patch (obsolete) — Splinter Review
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)
(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.
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+
Attached patch patchSplinter Review
No tabs for you!
Attachment #602196 - Attachment is obsolete: true
Attachment #602367 - Flags: review+
Whiteboard: [build_warning] → [build_warning][autoland-try:-b do -p all -u all -t none]
Whiteboard: [build_warning][autoland-try:-b do -p all -u all -t none] → [build_warning][autoland-in-queue]
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
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
Whiteboard: [build_warning][autoland-in-queue] → [build_warning]
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/031cfd3d00f6
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla13
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: