Closed Bug 666621 Opened 9 years ago Closed 9 years ago

jpeg/ - compiler warnings with gcc ("'main' is usually a function", and "section flags ignored on section redeclaration")

Categories

(Core :: Graphics, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: joey, Assigned: atulagrwl)

References

(Blocks 1 open bug)

Details

(Whiteboard: [build_warning])

Attachments

(1 file)

% 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



/mozilla/sandbox/gml/jpeg/jdmainct.c:164: warning: 'main' is usually a function
/mozilla/sandbox/gml/jpeg/jdmainct.c:205: warning: 'main' is usually a function
/mozilla/sandbox/gml/jpeg/jdmainct.c:245: warning: 'main' is usually a function
/mozilla/sandbox/gml/jpeg/jdmainct.c:274: warning: 'main' is usually a function
/mozilla/sandbox/gml/jpeg/jdmainct.c:311: warning: 'main' is usually a function
/mozilla/sandbox/gml/jpeg/jdmainct.c:351: warning: 'main' is usually a function
/mozilla/sandbox/gml/jpeg/jdmainct.c:391: warning: 'main' is usually a function
/mozilla/sandbox/gml/jpeg/jdmainct.c:480: warning: 'main' is usually a function
/mozilla/sandbox/gml/jpeg/jcmainct.c:71: warning: 'main' is usually a function
/mozilla/sandbox/gml/jpeg/jcmainct.c:117: warning: 'main' is usually a function
/mozilla/sandbox/gml/jpeg/jcmainct.c:247: warning: 'main' is usually a function
/mozilla/sandbox/gml/jpeg/simd/jccolss2-64.asm:34: warning: section flags ignored on section redeclaration
/mozilla/sandbox/gml/jpeg/simd/jdsamss2-64.asm:23: warning: section flags ignored on section redeclaration
/mozilla/sandbox/gml/jpeg/simd/jfss2fst-64.asm:47: warning: section flags ignored on section redeclaration
/mozilla/sandbox/gml/jpeg/simd/jfss2int-64.asm:67: warning: section flags ignored on section redeclaration
/mozilla/sandbox/gml/jpeg/simd/jdcolss2-64.asm:35: warning: section flags ignored on section redeclaration
/mozilla/sandbox/gml/jpeg/simd/jfsseflt-64.asm:38: warning: section flags ignored on section redeclaration
/mozilla/sandbox/gml/jpeg/simd/jiss2flt-64.asm:38: warning: section flags ignored on section redeclaration
/mozilla/sandbox/gml/jpeg/simd/jdmerss2-64.asm:35: warning: section flags ignored on section redeclaration
/mozilla/sandbox/gml/jpeg/simd/jiss2fst-64.asm:54: warning: section flags ignored on section redeclaration
/mozilla/sandbox/gml/jpeg/simd/jiss2int-64.asm:67: warning: section flags ignored on section redeclaration
/mozilla/sandbox/gml/jpeg/simd/jiss2red-64.asm:73: warning: section flags ignored on section redeclaration
Whiteboard: [build_warnings]
Whiteboard: [build_warnings] → [build_warning]
Attached patch Patch v1Splinter Review
Based on https://bugzilla.mozilla.org/attachment.cgi?id=463896&action=diff on current mozilla-central branch.
Summary: jpeg/ - compiler warnings on mac → jpeg/ - compiler warnings with gcc ("'main' is usually a function", and "section flags ignored on section redeclaration")
Comment on attachment 556853 [details] [diff] [review]
Patch v1

Does this fix the "section flags ignored on section redeclaration" warning?
Justin, Not actually. I really don't know the reason for this warning. I should have mentioned in the patch about it but I forgot to do so.
Duplicate of this bug: 585414
So then this isn't really a dupe of 585414, because that bug contains just one warning, and this one contains two.  Would you mind editing the summary of this bug so it reflects what you're fixing here?
Justin, I agree this is not a duplicate but this bug is super-set of bug 585414. Currently I am only fixing the first part of the bug (which involves errors in *.c files).
Attachment #556853 - Flags: review?(jmuizelaar)
Assignee: nobody → atulagrwl
Comment on attachment 556853 [details] [diff] [review]
Patch v1

I'd rather fix this upstream or disable this warning for libjpeg.
Attachment #556853 - Flags: review?(jmuizelaar) → review-
How feasible it is to fix this upstream knowing that it would impact multiple files for just compiler warnings?
(In reply to Atul Aggarwal from comment #8)
> How feasible it is to fix this upstream knowing that it would impact
> multiple files for just compiler warnings?

I don't know, but you could send an e-mail to the libjpeg-turbo mailing list.
(In reply to Justin Lebar [:jlebar] from comment #9)
> (In reply to Atul Aggarwal from comment #8)
> > How feasible it is to fix this upstream knowing that it would impact
> > multiple files for just compiler warnings?
> 
> I don't know, but you could send an e-mail to the libjpeg-turbo mailing list.

Sent an email to libjpeg-turbo-devel mailing list. Waiting for their reply and will act accordingly.
I applied a patch to fix the "main" warnings but am unsure what is causing the assembler warnings.  I don't see those on any of my systems.
DRC, When will the patch submitted by me be applied to libjpeg-turbo?
Your patch had to be modified slightly, but as I indicated above, the portion of it that fixes the "main" warnings has been applied (in trunk.)

I am unwilling to apply the rest of the patch until it is understood why the assembler warnings are occurring.  I cannot currently reproduce those, nor do I have time to diagnose them (nor do I really care, frankly, as long as the code builds and runs properly.)
DRC, Good enough for me. I also have no idea why assembler warnings are being thrown but we should fix "main" warnings.
Thanks a lot for such quick turnaround.
Given that DRC's applied the relevant bits upstream, let's call this Mozilla bug finished.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.