Closed GoogleCodeExporter closed 8 years ago
That bit of black magic relies on overloading the comma operator but sometimes
falling back to the default one.
Visual Studio compiles it properly, but I suppose is worried for us :)
Is there a way to selectively disable that warning just for this stretch of
code?
Original comment by jbe...@gmail.com
on 23 Feb 2010 at 7:33
sure, this can be done either at the project level (in the .vcproj file), or in
the
source code using "#pragma warning (disable: 4127 4913 4996 4355)"
the warnings i see in visual studio are:
warning C4127: conditional expression is constant
warning C4913: user defined binary operator ',' exists but no...
warning C4996: 'std::basic_streambuf<_Elem,_Traits>::sgetn': Function call with
parameters that may be unsafe - this call relies on the caller to check that the
passed values are correct. To disable this warning, use
-D_SCL_SECURE_NO_WARNINGS.
warning C4355: 'this' : used in base member initializer list
the attached file contains the output of the compiler so you can see in what
lines
each warning occur and maybe resolve some of them by changing the code rather
than
suppressing the warnings.
disabling them through the project file is done at: project properties > C/C++ >
advanced > disable specific warnings.
set it to 4127;4913;4996;4355 for both debug and release configurations.
or add the following line to the .vcproj file under <Tool
Name="VCCLCompilerTool"
DisableSpecificWarnings="4127;4913;4996;4355"
for both debug and release.
Original comment by oranagra...@gmail.com
on 23 Feb 2010 at 8:47
Attachments:
Thanks, fixed (r351). I didn't disable all the warnings, just the ones that
appeared
particularly annoying. I also "fixed" one of them.
Original comment by jbe...@gmail.com
on 3 Mar 2010 at 5:33
Original issue reported on code.google.com by
oranagra...@gmail.com
on 23 Feb 2010 at 7:13