What is the meaning of the Java warning "Type safety: The cast from Object to List is actually checking against the erased type List"? I get it when I try to cast an Object to a type with generic information, such as in the following code:
Object object = getMyList();List<Integer> list = (List<Integer>) object;...
When the Boost library/headers is used with VC++ 9 compilers (Visual C++ 2008 Express Edition or Visual Studio 2008), a lot of benign warnings are generated. They are of 2 kinds:
Warning about the Wp64 setting.
Warning about the compiler version.
How can I turn off these warnings?
...
I am currently developing a .NET application, which consists of 20 projects. Some of those projects are compiled using .NET 3.5, some others are still .NET 2.0 projects (so far no problem).
The problem is that if I include an external component I always get the following warning:
"Found conflicts between different versions of the same ...
I'm dealing with a MySQL table that defines the JobName column as UNIQUE. If somebody tries to save a new Job to the database using a JobName that is already in the database, MySQL throws a warning.
I would like to be able to detect this warning, just like an error, in my PHP script and deal with it appropriately. Ideally I would like...
So I'm working on an exceedingly large codebase, and recently upgraded to gcc 4.3, which now triggers this warning:
warning: deprecated conversion from string constant to ‘char*’
Obviously, the correct way to fix this is to find every declaration like
char *s = "constant string";
or function call like
void foo(char *s);
foo...
I have a function that gives me the following warning:
[DCC Warning] filename.pas(6939): W1035 Return value of function 'function' might be undefined
The function, however, is clean, small, and does have a known, expected, return value. The first statement in the function is:
Result := '';
and there is no local variable or parameter...
What's the reason for the "No newline at end of file" warning in some C++ compilers?
What's good about having an empty line at the end of a source\header file?
...
This has me puzzled. This code worked on another server, but it's failing on Perl v5.8.8 with Date::Manip loaded from CPAN today.
Warning:
Use of uninitialized value in numeric lt (<) at /home/downside/lib/Date/Manip.pm line 3327.
at dailyupdate.pl line 13
main::__ANON__('Use of uninitialized value in numeric lt (<) at
/home/dow...
How do you get Perl to stop and give a stack trace when you reference an undef value, rather than merely warning? It seems that use strict; isn't sufficient for this purpose.
...
It's a part of larger code base, which forces -Werror on gcc. This warning is generated in a third party code that shouldn't be changed (and I actually know how to fix it), but I can disable specific warnings. This time man gcc failed me, so please, let some gcc master enlighten me. TIA.
...
When running an old MFC application in Visual Studio's debugger I've seen a lot of warnings in the Output window like the following:
Warning: skipping non-radio button in group.
I understand that in MFC you put radio buttons in groups to indicate which sets of radio buttons go together. If I remember correctly you do this by setti...
While developing a C++ application, I had to use a 3rd party library which produced a huge amount of warnings related with a harmless #pragma directive being used.
../File.hpp:1: warning: ignoring #pragma ident
In file included from ../File2.hpp:47,
from ../File3.hpp:57,
from File4.h:49,
Is it possibl...
I wonder, why the hell... did the VS team consider that NOT finding a project reference as a non crucial thing?
The referenced component 'X' could not be found. should be considered an error... and nothing else.
Is there a way (without turning 'Treat all warnings as errors' on) to get this warning as an error in VS2008?
...
I know that the #warning directive is not standard C/C++, but several compilers support it, including gcc/g++. But for those that don't support it, will they silently ignore it or will it result in a compile failure? In other words, can I safely use it in my project without breaking the build for compilers that don't support it?
...
Is it possible to suppress warnings in Eclipse for JDK1.4 project?
EDIT:
Longer version. There is a project which requires JDK1.4 (no annotations). Only way of suppressing warnings I know is using annotation @SuppressWarnings - no can do in JDK1.4. Is there any way to remove some warning notifications in some specific method/class (not ...
We are currently using BizTalk 2006 R2 to build Enterprise Integration solutions. We use BizTalk maps extensively, but when you build a solution in Visual Studio 2005, it produces the following warning against maps:
Warning Double-click here to show/hide compiler links.
In my opinion, these are not real warnings and can be ignored, bu...
I've worked on many projects where I've been given code by others to update. More often than not I compile it and get about 1,000+ compiler warnings. When I see compiler warnings they make me feel dirty, so my first task is to clean up the code and remove them all. Typically I find about a dozen problems like uninitialized variables such...
I have a package that I just made and I have an "old-mode" that basically makes it work like it worked before: importing everything into the current namespace. One of the nice things about having this as a package is that we no longer have to do that. Anyway, what I would like to do is have it so that whenever anyone does:
use Foo qw(...
For example:
javac Foo.java
Note: Foo.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
...
In Visual Studio, I often use objects only for RAII purposes. For example:
ScopeGuard close_guard = MakeGuard( &close_file, file );
The whole purpose of *close_guard* is to make sure that the file will be close on function exit, it is not used anywhere else. However, Visual Studio gives me a warning that a "local variable is initial...