warnings

conversion to ‘size_t’ from ‘int’ may change the sign of the result - GCC , C

In my project I have turned on treat warnings as errors and compiling using the -pedantic and -ansi tags. I am using GCC compiler. In this project I have to use a third party source code which has got lot of warnings. Since I treat warnings as errors, I am having a tough time in fixing their code. Most of the warnings are about invalid...

How do you suppress GCC linker warnings?

I've been on a crusade lately to eliminate warnings from our code and have become more familiar with GCC warning flags (such as -Wall, -Wno-<warning to disable>, -fdiagnostics-show-option, etc.). However I haven't been able to figure out how to disable (or even control) linker warnings. The most common linker warning that I was getting i...

How does one suppress specific warnings from source code on g++ 4.5 or later?

The first comment on a feature request for g++ says, "Starting with 4.5 you can disable a class of warnings in the source." I looked through the 4.5.0 manual, but I can't find the syntax. What is the syntax in g++ 4.5 and later to suppress individual warning classes in the source? ...

Display warning popup when leaving secure site

Refer to previous: http://stackoverflow.com/questions/2365994/display-a-warning-when-leaving-the-site-not-just-the-page/3442524#3442524 I'm needing something very similar, however, instead of relying on any rel, id, or onClick designations in the html's anchor tag, I need a way for the javascript to popup a warning if it's determined th...

Unused 'using' directives are not shown as warning, any valid reason?

Unused 'using' directives are not shown as warning [C#], why is it so? Is there any valid reason on this? ...

How to suppress Objective-C warning "incomplete implementation of class 'SomeClass'"?

I have a class which routing many messages into inner component instance. So the class have only method definition, but no implementation. How can I suppress these warnings for those dynamic methods? -- edited -- My code sample: @interface SomeClass : NSObject { } - (void)mssageA:(id)value1 additionalOption:(id)value2; - (void)mssageB...

How to get printf warnings in Visual Studio 2005?

When providing the wrong number of arguments to printf(): printf("%s", "foo", "bar"); or when by providing arguments of the wrong type: printf("%d", "foo"); gcc is able to warn about these mistakes: $ gcc -Wformat printf_too_many_arguments.c printf_warnings.c: In function `main': printf_warnings.c:5: warning: too many arguments fo...

Flex Builder : How to mark a warning as an error and aborting the build

Is there a way by which I could make a warning behave like an error in Flex Builder. In particular I am highly worried about this warning : 1100 : Assignment with conditional. Did you mean == instead of =? ...

Why in this call to AfxWinInit I get a warning C6309 ???

Hello, while doing some static code analysis I've found a weird one. On a call like this one: if(!AfxWinInit(moduleHandle,NULL,::GetCommandLine(),0) I get the warning C6309 at the second parameter (C6309: argument 2 is null: it does not adhere to function specification of AfxWinInit) Docs say that for Win32 applications the second p...

Enabling Migration Warnings

I am porting a 2.7.7 scala code base over to 2.8 and was wondering if there was a compiler option to display migration notices? I was bitten by a change in behavior for mutable sequences that had the following migration notice[1], however it doesn't display anything when I build the project ( I have deprecation and unchecked warnings ena...

Suppressing Doxygen warnings

Is there a way to suppress Doxygen from giving "not documented" warnings on particular files? My project has several automatically generated code headers that cause it to throw hundreds or thousands of errors that make it difficult to sift through. ...

Objective-C: "warning: property 'owner' type does not match protocol 'PieceModel' property type"

I'm getting this warning. What I'm trying to do is have a family of classes and a parallel family of protocols. The class Piece has a declaration like this: @interface Piece : NSManagedObject <PieceModel> { } ... @property (nonatomic, retain) Player *owner; ... @end PieceModel has this @protocol PieceModel <NSObject> ... @prope...

Is there a way to show ALL the compiler warnings in Visual Studio 2010?

I'm cleaning up a project to get rid of all the warnings, but I can only see the first 100 or so in the Error List pane. This is a problem because we're using Team Server for source control and all the warnings shown are in files that are currently checked out (and therefore I can't modify without making someone else possibly do a lot o...

Lisp style question: memoization (caution: contains the solution for project euler #14)

Hello, I am just trying to learn some Lisp, so I am going through project euler problems. I found problem no. 14 interesting (so if you are planning to solve this problems stop reading now, because I pasted my solution at the bottom). With my algorithm it was so slow, but after using memoization (I copied the function from Paul Graham's...

"name used only once" warning while using List::Util::reduce

Possible Duplicate: How do I prevent List::MoreUtils from warning about using $a and $b only once? I get a warning like this: Name "main::a" used only once: possible typo at analysis.pl line 15. on this line return join("_", @monsters) if @monsters && List::Util::reduce { $a && $b // 0 > 0 } 1,@monsters; I understand tha...

Unknown modifier '/' in ...? what is it?

When i wrote the following, i get such warning, and it doesn't match anything, but i'm sure, that $row_search['content'] contains $value... preg_match_all("/[^\s]*".preg_quote($value)."[^\s]*/iu", $row_search['content'], $final_matched); WARNING:preg_match_all() [function.preg-match-all]: Unknown modifier '/' in C:\xampp\htdocs\finance...

System header files redefining macros: how do I tell gcc to ignore?

I have some Motif code that also uses widgets from the Xmt widget set. It include both "Xm/XmStrDefs.h" and "Xmt/ComboBox.h". However, there are some macros that are defined in both files: // XmStrDefs.h: #define XmNarrowSize "arrowSize" // ComboBox.h: #define XmNarrowSize "arrowSize" These are system header files that I'm not allow ...

Xcode project — old files warnings

Hi, I have a lot of warnings in my Xcode project about old files that have been deleted from my project and from the project's folder. I have tried to delete the "build" folder of the project. Any suggestions? Thanks! ...

How to determine real format of an XLSX Excel file?

Hi! I have a well known problem that is described in Extension Warning On Opening Excel Workbook from a Web Site microsoft blog entry. I've added URL rewrite to have URL nicely formatted and my mime type matches exactly XLSX recommended file type. However I still get a warning. I suspect that service that provides me those xlsx files m...

Check that a function raises a warning with nose tests

I'm writing unit tests using nose, and I'd like to check whether a function raises a warning (the function uses warnings.warn). Is this something that can easily be done? ...