Suppose I have files a.cpp and b.cpp and I get warnings in a.cpp and an error in b.cpp. I fix the error in b.cpp and recompile -- since Visual Studio doesn't have to recompile a.cpp, it doesn't remind me of the warnings it found before.
I'd like to somehow have the warnings persist; however, I don't want it to treat warnings as errors (...
hi i have a bunch of compile time asserts and do something like
CASSERT(isTrue) or CASSERT2(isTrue, prefix_)
in GCC i get many "warning 'prefix_LineNumber' defined but not used" is there a way i can hide warnings for compile time asserts? i had no luck searching the gcc documentation then thought i may hack something by having the var a...
Everytime I run rake or most rails commands, I get an annoying warning. I'm still a beginner with Ruby/Rails, and I would like advice on how to hack boot.rb to stop the annoying warning. I'm using Rails 1.2.6 and RubyGems 1.3.1. (I haven't upgraded Rails to 2.x because I'm still learning Rails from a book that uses 1.2.x.) I'm gratef...
What compiler warning level do you recommend for different C/C++ compilers?
gcc and g++ will let you get away with a lot on the default level. I find the best warning level for me is '-Wall'. And I always try to remove fix the code for the warnings it generates. (Even the silly ones about using parenthesis for logical precedence rule...
Hello,
For our VB.NET websites we use SVN for Source Control and CruiseControl.NET for continuous integration.
To use the SVN build number in the compilation by CruiseControl.NET we need to use Web Deployment Projects. We then replace in the configuration file the Version field with this variable from SVN Labeller
$(CCNetLabel)
Th...
I have the following snippet of code that's generating the "Use new keyword if hiding was intended" warning in VS2008:
public double Foo(double param)
{
return base.Foo(param);
}
The Foo() function in the base class is protected and I want to expose it to a unit test by putting it in wrapper class solely for the purpose of unit tes...
$ cat t.cpp
int sign(int i) {
if(i > 0) return 1;
if(i == 0) return 0;
if(i < 0) return -1;
}
$ g++ -c t.cpp -Wall
t.cpp: In function ‘int sign(int)’:
t.cpp:5: warning: control reaches end of non-void function
$
What do I do about this?
Stop using -Wall as it's clearly wrong? Add a bogus return 0 at the end? Clutter the co...
I talked my team into turning on compiler warnings again. Some how all warnings (-w) were disabled (don't ask...). Most of them are obvious but one of them is really annoying. I get it from my date and time classes which are used in lots of places. Story is really simple. Time is subclass of Date and both of them have their operators def...
The following code generates warning C4250. My question is, what's the best solution to it?
class A
{
virtual void func1();
}
class B : public A
{
}
class C : public A
{
virtual void func1();
}
class D : public B, public C
{
}
int main()
{
D d;
d.func1(); // Causes warning
}
According to what I've read it should be possibl...
I have been involved in the development of large code bases that grew to millions lines of code over the course of multiple years and where the amount of warnings grew out of control because it was not a concern for the initial developers. Technical debt accumulated and now, I would like to pay it back.
Do you know of any process, metho...
I am writing a Perl module, and I am using carp to throw a non-fatal warning back to the calling program.
The carp warning works fine - I am checking if an input parameter meets a certain condition - if it does not meet the condition, a warning is sent with carp and the module continues on using a default for the parameter instead of th...
The question is in the title : "Is there an equivalent to java @SuppressWarnings in JSP ?"
...
When i try to compile this as part of an objective-c program it gives the warning:
warning: passing argument 1 of 'sqlite3_close' from incompatible pointer type
sqlite3 *db;
sqlite3_open("~/Documents/testdb.sqlite", &db);
/*stuff*/
sqlite3_close(&db);
An almost identical error is given with nearly any other function call that uses &d...
I am currently developing an EJB 3.0 based application on the JBoss AS 5.0.0.GA and just recently the following warning showed up in the server log:
09:50:19,735 WARN [InterceptorsFactory] EJBTHREE-1246: Do not use InterceptorsFactory with a ManagedObjectAdvisor, InterceptorRegistry should be used via the bean container
09:50:19,735 W...
Background: I have a tab bar application. Each tab contains navigation controller allowing the user to transition from one view to the other showing a drill down information of the data (each view is being handled by a view controller and each view controller class has -didReceiveMemoryWarning method). Lists are populated by pulling the ...
I had a VS2008 project that was showing this warning, and I couldn't find a solution anywhere - perhaps my google-fu is weak.
In any case, the apparent solution to this is to make sure that the TagName is the name of control class.
So for my example, the following displayed the warning:
<%@ Register Src="~/path/to/Control.ascx" TagNam...
Eclipse is giving me a warning of the following form:
Type safety: Unchecked cast from Object to HashMap<String, String>
This is from a call to an API that I have no control over which returns Object:
HashMap<String, String> getItems(javax.servlet.http.HttpSession session) {
HashMap<String, String> theHash = (HashMap<String, String...
In the past I've worked with -Wall and other switches for gcc to eliminate every compiler warning for projects I've been involved in. Similarly, in Perl, I always program with use strict and use warnings (and often -T as well) to try to achieve the best code quality I can. I understand that a few years ago, the Perl porters group worke...
The Microsoft C compiler warns when you try to compare two variables, and one is signed, and the other is unsigned. For example:
int a;
unsigned b;
if ( a < b ) { // warning C4018: '<' : signed/unsigned mismatch
}
Has this warning, in the history of the world, ever caught a real bug? Why's it there, anyway?
...
I'm using mingw32-make to compile a qt project that uses opengl, it compiles correctly and everything, but it spits countless warning messages of the form:
c:/qt3/include/qcolor.h:67: warning: inline function `int qGray(int, int,
int)' declared as dllimport: attribute ignored
For this particular instance, the function declaration is:...