Last Comment Bug 721502 - HttpChannelParent.cpp:336:0: warning: ignoring #pragma warning [-Wunknown-pragmas]
: HttpChannelParent.cpp:336:0: warning: ignoring #pragma warning [-Wunknown-pr...
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Networking (show other bugs)
: Trunk
: x86_64 Linux
: -- normal (vote)
: ---
Assigned To: Honza Bambas (:mayhemer)
:
:
Mentors:
Depends on:
Blocks: buildwarning 621446
  Show dependency treegraph
 
Reported: 2012-01-26 13:18 PST by Daniel Holbert [:dholbert]
Modified: 2012-03-27 02:49 PDT (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments

Description Daniel Holbert [:dholbert] 2012-01-26 13:18:06 PST
Filing bug on this warning:
HttpChannelParent.cpp:336:0: warning: ignoring #pragma warning  [-Wunknown-pragmas]

for this MSVC-specific line:
> 336 #pragma warning(disable : 4068)
http://mxr.mozilla.org/mozilla-central/source/netwerk/protocol/http/HttpChannelParent.cpp#336

The correct way to do this is demonstrated e.g. here in jsopcode.h:
> 286 #ifdef _MSC_VER
> 287 #pragma warning(push)
> 288 #pragma warning(disable:4100)
> 289 #endif
[...code that needs the warning disabled...]
> 436 #ifdef _MSC_VER
> 437 #pragma warning(pop)
> 438 #endif
http://mxr.mozilla.org/mozilla-central/source/js/src/jsopcode.h#288

That way, non-MSVC compilers don't see the pragma and won't complain about it.
Comment 1 Atul Aggarwal 2012-03-27 02:49:35 PDT
This bug has been fixed as a part of bug 621446. Patch file being
https://bug621446.bugzilla.mozilla.org/attachment.cgi?id=605532

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