8
голосов
1ответов
345 просмотров

warnings::warn and FATAL categories in Perl

I must be understanding the warnings documentation wrong. The way I read it, this code: use warnings; use warnings FATAL => 'all'; warnings::warn('numeric', 'blarg'); print "finished\n"; Should print the 'blarg' warning and die since I've asked for all warnings to be fatal. However, when ...

4
голосов
2ответов
1757 просмотров

Why does Perl warn me about using pseudo-hashes?

Perl is warning me about using pseudo hashs in my program: Pseudo-hashes are deprecated How do I convert the following code so that is does not use pseudo hashs foreach my $hash (@arrayOfHash) { print keys %{$hash}; }

2
голосов
2ответов
2579 просмотров

casting issue with realpath function (c programming)

When I compile the following code: #define _POSIX_C_SOURCE 200112L #define _ISOC99_SOURCE #define __EXTENSIONS__ #include <stdio.h> #include <limits.h> #include <stdlib.h> int main(int argc, char *argv[]) { char *symlinkpath = argv[1]; char actualpath [PATH_MAX]; ...

12
голосов
2ответов
3292 просмотров

Why is the 'Use of "shift" without parentheses is ambiguous' warning issued by Perl?

Does anyone know what parsing or precedence decisions resulted in the warning 'Use of "shift" without parentheses is ambiguous' being issued for code like: shift . 'some string'; # and not (shift) . 'some string'; # or shift() . 'some string'; Is this intentional to make certain syntactic co...

3
голосов
1ответов
1195 просмотров

Decipher UIViewController property warning

I cant understand what this warning I get on Xcode is about. Searching for it on google wasn't of too much help. If anyone has come across this warning before, it'd be great if I could get some hints on how I'd be able to get rid of it. The (updated) screenshot is at: http://imagebin.antiyes.co...

13
голосов
2ответов
618 просмотров

Can I get warnings for sending nil objects messages?

I'm aware that it's perfectly fine to send messages to nil objects in Objective-C. However, I am curious if there is any runtime support for flagging such situations. I can see this being useful in testing/debugging situations.

4
голосов
5ответов
2768 просмотров

How to define (non-method) functions in header libraries

When writing a header library (like Boost), can one define free-floating (non-method) functions without (1) bloating the generated binary and (2) incurring "unused" warnings? When I define a function in a header that's included by multiple source files which in turn is linked into the same binar...

3
голосов
3ответов
1223 просмотров

Custom Compiler Warnings in Visual Studio 2008

Custom Compiler Warnings and C#: Create custom warning in Visual Studio if certain method is used in source code haven't helped as they deal with code that is under the author's control. We are using a 3rd party suite of UI controls (DevExpress) in our software and I want to generate a warning w...

3
голосов
3ответов
495 просмотров

What does a PHP warning mean if it refers to something that happened on "Line 0"?

I've not come across an error like this before where Line 0 is referred to. Does it have a specific meaning, or is it simply that PHP was unable to determine the line number before something went wrong? The full warning is: Warning: mysql_fetch_array(): supplied argument is not a valid MySQL re...

5
голосов
3ответов
6835 просмотров

Why do I get encoding error in python warnings.formatwarning on format string?

I get encoding error on this line: s = "%s:%s: %s: %s\n" % (filename, lineno, category.__name__, message) UnicodeEncodeError: 'ascii' codec can't encode character u'\xc4' in position 44: ordinal not in range(128) I tried to reproduce this error by passing all combinations of parameters to st...

0
голосов
2ответов
389 просмотров

How to catch and display warnings to the user

Essentially the warning in our case is just a validation, we don't want to mark it as an error just a warning so the user knows. I was hoping to use the same or similar method used for validation. Currently I'm leaning towards implementing IDataErrorInfo. But I'd like to change the style on di...

1
голосов
1ответов
13039 просмотров

XCode warning : Initialization makes pointer from integer without a cast (while trying to assign a value to a NSNumber)

I'm stuck with a warning in Xcode while trying to develop a small iPhone App. I've got this piece of code in Xcode : NSNumber *randomNumber = arc4random() % [array count]; If I NSLog randomNumber, everything seems to work but Xcode keeps warning me, saying : Initialization makes pointer from i...

14
голосов
7ответов
13737 просмотров

Disable Flex CSS type selector warning?

I'm building a somewhat large Flex project that includes several modules (a single Flex project that produces multiple SWFs) Right now, I have a single css file, being loaded in the main SWF tag: <s:Application ... > <fx:Style source="css/main.css" /> ... </s:Application> ...

239
голосов
21ответов
196164 просмотров

How do I best silence a warning about unused variables?

I have a cross platform application and in a few of my functions not all the values passed to functions are utilised. Hence I get a warning from GCC telling me that there are unused variables. What would be the best way of coding around the warning? An #ifdef around the function? #ifdef _MSC...

1
голосов
5ответов
326 просмотров

How to get rid of the warning with time.h in C++?

When I use this #include<time.h> //... int n = time(0); //... I get a warning about converting time to int. Is there a way to remove this warning?

5
голосов
3ответов
44669 просмотров

C# could not load file or assembly...system cannot find file specified

Writing a routine WinForms app that references a few custom libraries written by myself. I am building one particular library which depends on another library and, when I do, I get the following warning message: "Could not load file or assembly 'RHLib' Version 1.0.0.0, Culture=neutral, Pub...

4
голосов
6ответов
12351 просмотров

How to disable runtime warnings in java?

I am using a jar file in a java program and it generates warnings during runtime. But I don't want that my customer sees these warnings. How can I disable these warnings. The warning is as below: Sep 25, 2009 10:10:33 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify WARNING: Ex...

12
голосов
2ответов
3744 просмотров

How to disable warning in xcode on specific line?

I've got a call like this [Class method] and a warning saying that Class may not respond to "method" message. The "method" message does not indeed exist but my code use unknown message catching (using forwardingTargetForSelector) so it will run fine and it is build to run that way. How can I hid...

0
голосов
2ответов
112 просмотров

How to specify type for bulk list assignments

I have the following code that looks like this [a,b,c,d] = ["a","b","c","d"] The compiler reports the warning: Warning: Definition but no type signature for 'a' Inferred type: a :: [Char] How to silence the warning and specify the type for this expression?

3
голосов
2ответов
11700 просмотров

mysql now() Incorrect datetime value for column - error code 1292

When doing simple maths using now() ... mysql> select cdrstatuschangets from cdrs where ( cdrstatuschangets < now() - 10 ); +---------------------+ | cdrstatuschangets | +---------------------+ | 2009-09-25 13:55:50 | +---------------------+ 1 row in set (0.0...

0
голосов
4ответов
2194 просмотров

initwithint warning, no method found?

I have a warning and just can't work out how to make it go away. In my .h I have this... -(void)restartTimer; Then the in my .m I have... -(void)restartTimer{ TimerViewController *TimerView = [[TimerViewController alloc] initWithInt:hStart number:mStart]; I get this error: Warning: no...

0
голосов
3ответов
266 просмотров

How to make this PHP snippet work without warning?

The code is short,but complete: function process($obj) { if(empty($obj))return 1; return 2; } echo process($arr['nosuchkey']); As we all know, calling empty($arr['nosuchkey']) will never report warnings. But process($arr['nosuchkey']) will report a notice. Is there a workaround wit...

187
голосов
1ответов
132972 просмотров

Disable all gcc warnings

I'm working on a project that will read compiler error messages of a particular variety and do useful things with them. The sample codebase I'm testing this on (a random open-source application), and hence rebuilding frequently, contains a few bits that generate warnings, which are of no interest...

2
голосов
4ответов
2040 просмотров

How do I get rid of this warning?

I am getting the following warning from my Java code: Lexer.java:591: warning: [unchecked] unchecked conversion found : java.util.ArrayList required: java.util.ArrayList<java.lang.Integer> ArrayList<Integer> tempArray = temp.get(theToken); I've tried casting it to ArrayList but t...

8
голосов
6ответов
5280 просмотров

How to find potential numeric overflows in Java code, using Eclipse?

Is there a way to find potential numeric overflows in Java code, using the Eclipse IDE? For example... long aLong = X * Y * Z; ... where X, Y, and Z are ints and the result may overflow Integer.MAX_VALUE. (Note that, perhaps counter-intuitively, if the result in this example overflows Integer....

29
голосов
3ответов
6255 просмотров

Should I output warnings to STDERR or STDOUT?

I'm making a script that handles a predefined set of data, outputting to a file. I want to pop up a warning when one datum (which is always "Regular" in every set that I've had access to) is different stating that this value is unhandled (since I don't know how it affects the data). Should I outp...

4
голосов
2ответов
1258 просмотров

Objective-C Warning

I am fairly new to objective-c and am having trouble understanding the warning message for the following block of code: void PrintPathInfo() { NSString *path = @"~"; NSString *message = @"My home folder is: "; NSLog([message stringByAppendingString: [path stringByExpandingTildeInP...

1
голосов
3ответов
2588 просмотров

Python: Warnings and logging verbose limit

I want to unify the whole logging facility of my app. Any warning is raise an exception, next I catch it and pass it to the logger. But the question: Is there in logging any mute facility? Sometimes logger becomes too verbose. Sometimes for the reason of too noisy warnings, is there are any verbo...

0
голосов
3ответов
171 просмотров

include and require problem when I use it with file out of the folder

I usually use this line to import file from out of the current folder and it's work fine on my local host server require("../DataBase.class.php"); but when I upload the script on my website I get this Warning Warning: include(../DataBase.class.php) [function.include]: failed to open ...

4
голосов
1ответов
1756 просмотров

Python Warning control

I would like some kind of warning to be raisen as errors, but only the first occurrence. How to do that? I read http://docs.python.org/library/warnings.html and I dont know how to combine this two types of behaviour.