warnings

Android - AIDL gen files causing warnings?

Hi, I have created some aidl files for IPC in my Android project. They compile and run file however in the generated .java files I am getting warnings of un-used imports as follows: The import android.os.Binder is never used EngineInterface.java /gen/com//phone/engine line 10 Java Problem Now I presume that they are there for a...

Why do I get warning C4081 on this #pragma?

I am in the habit of removing all warning reported in my code. I just like a clean build if possible. I used #pragma comment(lib,"some.lib"); I get this warning: warning c4081: expected 'newline'; found ';' I am uncertain why that would create a warning. Could I get help on removing it? ...

Count warnings in Python 2.4

I've got some tests that need to count the number of warnings raised by a function. In Python 2.6 this is simple, using with warnings.catch_warnings(record=True) as warn: ... self.assertEquals(len(warn), 2) Unfortunately, with is not available in Python 2.4, so what else could I use? I can't simply check if there's been a sing...

A list of Java errors and warnings

Where/How could I get a list of all the java and javac's error and warning messages? ...

No warning in VB.NET when function has no return

Some comments on this SO question regarding warnings got me thinking about old issues that always goofed me up when I was writing more VB.NET code. One of them was the fact that the compiler didn't warn if you declared a Function but never did an explicit Return statement or assign to the Function name. Running Visual Studio 2008, I just...

How can I resolve this case of `Useless use of a variable in a void context`?

How can I resolve this case of Useless use of a variable in a void context? For example: my $err = $soap_response->code, " ", $soap_response->string, "\n"; return $err; I get warnings like Useless use of a variable in a void context? Why? How can I resolve it ? ...

I'm getting a php warning: cannot modify header information (but I have my include file before the html code!)

I'm getting this: Warning: Cannot modify header information - headers already sent by (output started at /www/zxq.net/a/l/e/alexchen/htdocs/index.php:12) in /www/zxq.net/a/l/e/alexchen/htdocs/common.php on line 13 right on my h2 tag. I have my common.php before the html code. I don't know what the problem is. Help! i...

Can't get ride of "this decimal constant is unsigned only in ISO C90" warning

Hi, I'm using the FNV hash as a hashing algorithm on my Hash Table implementation but I'm getting the warning in the question title on this line: unsigned hash = 2166136261; I don't understand why this is happening because when I do this: printf("%u\n", UINT_MAX); printf("2166136261\n"); I get this: 4294967295 2166136261 Which ...

What does this error description mean?

While compiling a program in Java I got this big WARNING warning: [unchecked] unchecked call to LinkedList(java.util.Collection) as a member of the raw type java.util.LinkedList on this line: LinkedList<Integer> li2 = new LinkedList(li); What does this warning mean? Edit: It should have been infact: LinkedList<Integer> li2...

C++: Compiler warning for large unsigned int

I have following array, that I need to operate by hand on bitmaps. const unsigned int BITS[32] = {1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288, 1048576, 2097152, 4194304, 8388608, ...

Getting results of perl -w tag into a file

Is it possible to add the -w tag to the first line of a perl program, then run the program from a shell like bash or dos and write all of the warnings into a file? perl somescript.pl > somefile.txt This is a throwback to desk checking COBOL programs at school. I'd like to have all of the warnings in front of me on a piece of paper so ...

How to set warning level in CMake?

How to set the warning level for a project (not the whole solution) using CMake? Should work on Visual Studio and GCC. I found various options but most seem either not to work or are not consistent with the documentation. ...

How do I make a warning only occur once in ruby?

Is it possible to tell ruby to give a warning only once, rather than multiple times? class SoylentGreen def eat warn "Algae harvesting not implemented. Soylent green is people!" end end 5.times do soylent_green = SoylentGreen.new soylent_green.eat end produces Algae harvesting not implemented. Soylent green is people! Al...

How can I get warning output from a PowerShell cmdlet programatically in v1.0?

Hi, I'm using PowerShell v1.0 (It is a requirement that I cannot use 2.0) and am having trouble trying to programatically capture the cmdlet output in the Warning stream. In Powershell 2.0 it's easy: var powerShell = PowerShell.Create(); powerShell.AddCommand(someCommand); powerShell.Invoke(); foreach (var warning in powerShell.Strea...

How do I get missing prototype warnings from g++?

I currently have a project that uses g++ to compile it's code. I'm in the process of cleaning up the code, and I'd like to ensure that all functions have prototypes, to ensure things like const char * are correctly handled. Unfortunately, g++ complains when I try to specify -Wmissing-prototypes: g++ -Wmissing-prototypes -Wall -Werror ...

How do I disable and then re-enable a warning?

I'm writing some unit tests for a Python library and would like certain warnings to be raised as exceptions, which I can easily do with the simplefilter function. However, for one test I'd like to disable the warning, run the test, then re-enable the warning. I'm using Python 2.6, so I'm supposed to be able to do that with the catch_wa...

iPhone Development - Compiler Warning!

Sometimes when i try to "build"/compile a downloaded source, i get following warning: ld: warning: directory '/Volumes/Skiiing2/CD/ViewBased/Unknown Path/System/Library/Frameworks' following -F not found Has anyone else seen this issue? ...

Default taglibs used within included JSPs for editing

Hello everyone Within Eclipse's jsp-editor, as you all know, I get code-assistance for external taglibs once I defined them. In the project I am working on now a lot of jsps are just included and have no taglib definition in the top which gives me a lot of editor warnings. In the deployment this doesnt matter because the taglibs are def...

C warning Missing sentinel in function call

This is my warning. Missing sentinel in function call How i can remove it. i am using linux & gcc compiler. ...

C .pc file warning

I have a RefTables.pc file. when i type make command. This is my warning. RefTables.c:109: warning: type defaults to `int' in declaration of `sqlcxt' RefTables.c:111: warning: type defaults to `int' in declaration of `sqlcx2t' RefTables.c:113: warning: type defaults to `int' in declaration of `sqlbuft' RefTables.c:114: warning: type d...