warnings

How to handle subroutine redefined errors in Perl

So I have a file that in short has this problem... #!/usr/bin/perl -w package Foo; use strict; use POSIX; ... sub remove { ... } ... and I get a get an error saying the subroutine remove has been redefined. I know the problem, there is a subroutine called remove in POSIX. However, I don't know how to handle it. How is this proble...

Visual C++: How is checked_array_iterator useful?

On compiling code at Warning Level 4 (/W4), I get C4996 warnings on std::copy() calls whose parameters are C arrays (not STL containers like vectors). The recommended solution to fix this seems to be to use stdext::checked_array_iterator. What is the use of stdext::checked_array_iterator? How does it work? Why does it not give any comp...

Warn the user a file is too big before the upload

Hello SO, To increase user experience, I would like to warn the user that the file is too big (let's say > 8M) before sending the whole file (which may take some time due to the size and the client connection). All kind of fields can be "pre-validated" client-side for a better user experience, but I'm stuck on the file size problem. Is...

Turning HtmlUnit Warnings off

Do you know how can I turn Warnings, Notes, Errors in HtmlUnit off? ...

iPhone - "Class" may not respond to "method"

I am building a simple Navigation-based app using tables. I have a custom "UITableViewCell" to customize the table cell data attached below. @interface NewsCell : UITableViewCell { IBOutlet UILabel *newsTitle; } - (void)setNewsLabel:(NSString *)title; @end And then in my RootViewController, I set the text of the label "newsTitle...

InfoPath -how to disable Microsoft Office InfoPath Security Notice - "Microsoft has identified a potential security concern"

I have an InfoPath form template as a content type in a form library on SharePoint. The form has several data connections which on submit, save it back to a specific form library on SharePoint depending on how one field is filled out. After I added an additional data connection to receive information from SQL to a drop down control, ...

How do I avoid the "Useless use of == in void context" in RSpec?

In RSpec, if I have warnings on and have x.should == 42 another_line_of_code then I get a warning about warning: useless use of == in void context Is there anything I can do other than Turn warnings off Change it to bitbucket = (x.should == 42) ...

Java 6: Unsupported @SuppressWarnings("rawtypes") warning

I moved to a new machine which has the latest Sun's Java compiler and noticed some warnings in the existing Java 6 code. The Eclipse IDE, suggested that I annotate the assignment with: @SuppressWarnings("rawtypes") For example: class Foo<T> { ... } ... @SuppressWarnings("rawtypes") Foo foo = new Foo(); When I moved back to the mach...

Trace source of deprecation warnings in rails tests

When running my functional tests, I'm getting the following warning in one of the test cases but I can't pinpoint where it's coming from: gems/actionpack-2.3.8/lib/action_controller/record_identifier.rb:76: warning: Object#id will be deprecated; use Object#object_id Unfortunately that's the only line of the backtrace that's shown, even...

memory leak on shared delegate

Hi friends, I am using shared delegate for getting data on url connection. I getting a memory leak on my code. Can anybody please tell me what i have done wrong. Thanks in advance. Analyser Warning: /Users/sathish/Documents/XXX 20100908 ManageMem/Classes/Data Download/XXX DataConnect.m:68:22: warning: Potential leak of an object alloc...

Can I ignore this iphone warning?

Hi there I have this code: if([annotation respondsToSelector:@selector(tag)]){ disclosureButton.tag = [annotation tag]; } and I get the warning: '-tag' not found in protocol Fair enough, but I've created a new object with the protocol that has a synthesized int tag variable. EDIT: found why the app was crashing - not this...

PHP 5 : Function eregi()

Hi, I m using PHP5 with Xampp server After successful installation of OSCommerce2.2 there are some warnings appear as below Deprecated: Function eregi() is deprecated in D:\xampp\htdocs\oscomm\catalog\includes\classes\language.php How ever this was never occur before .. ...

mysql_num_rows(): supplied argument is not a valid MySQL result resource

if(mysql_num_rows($result)) { echo "no match found!"; } it is throwing an error- Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in D:\Hosting\6448289\html\includes\getQuestion.php on line 72 ...

How to work with CALayer: Trying to draw a Layer in my Application

Hi Friends , I am trying to add a layer(CALayer/CGLayer) to my application. So i googled for that and tried. When i am trying to create a CALayer using the following code -(void) awakeFromNib{ CALayer *layer =[CALayer layer]; } But it is showing some warning when compiling.[Warning: No +'layer' method found] I add the framework Q...

How do I deal with the warning Unknown escape sequence '\040' in cocoa

I have the following Warning popping up in a few of the Applescripts I'm running in a Cocoa application: I have tried everything I can think of to remove the error such as totally rewriting it, copying and pasting from another similar script that doesn't have the warning etc. but I can't get rid of it. Can anyone tell me where I might...

Are printf/sprintf compiler warnings a conceptual break?

I have noticed that a large number of C compilers issue warnings when the conversion specifiers in the format string of the printf/sprintf functions do not match the type or the count of the corresponding arguments. That seems to me like a conceptual break since C doesn't have built-in functions according to the language specification. ...

How does Xcode's linker decide where to look for frameworks?

Now I know there are certain standard paths in which the linker looks for frameworks, but where does get it's instructions from, to look in other custom paths? The problem I've got is a warning, something like this: ld: warning: directory '/Path/to/my/Xcode/Project/../../../../../some/other/src/path/no/longer/in/use' following -F not f...

Python set error reporting level like in PHP

Hello, How can I set error reporting and warning outputs in Python like in PHP error_reporting(E_LEVEL)? ...

How can I avoid warnings in Perl?

I have a small piece of code for printing the contents in a text file like this, use strict; use warnings; open (FILE, "2.txt") || die "$!\n"; my $var = <FILE>; while ($var ne "") { print "$var"; $var = <FILE>; } Text file is, line 1 line 2 line 3 After running the code i am getting a warning like this, line 1 line 2 l...

Is it safe to ignore the warning: Value stored in delayTimer is never read?

This is how my code looks currently NSTimer *delayTimer; delayTimer = [NSTimer scheduledTimerWithTimeInterval:0.01 target:self selector:@selector(longRunner) userInfo:nil ...