warnings

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 constructs easier? Or is it merely an artif...

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]; char *ptr; ptr = realpath(symlinkpath, actualpath); ...

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}; } ...

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 I run the code I get: $> /opt/local/bin/perl...

C# Mark Properties in foreign assemblies as obsolete?

I'd like to mark some specific properties in a foreign assembly that i'm referencing as obsolete. Is it possible to do so? Or is it possible to get a compiler warning/error if a specific property is used? We have our own DateTime class for specific tests and i want everyone to use them and not the normal DateTime.Now and DateTime.Today ...

unnecessary (?) Xcode warning

I'm running Xcode in OS X 10.6 on a Core 2 Duo. Here's a short program: #include <stdio.h> int main () { long a = 8589934592L; printf("a = %li\n", a); return 0; } When I compile this from the command line (gcc -pedantic) I get no errors or warning. When I compile this in Xcode in debug configuration, I get no errors or ...

Why does my Perl script complain about "Global symbol "$random_name" requires explicit package name"?

Hello, I'm learning Perl and at the same time I'm creating a program to my family events, but when I'm trying to use a array with a randomization process I'm getting some errors, as you could see: [ubuntu@eeepc:~/Desktop/mail] ./get.pl -h pop.vix.terra.com.br -u nathanpc -p (:D) Global symbol "$random_name" requires explicit package n...

Bison build warning: "-s option given but default rule can be matched"

I get the warning warning, -s option given but default rule can be matched if you google option given but default rule can be matched You'll get results of flex homepage and an entry in a man page. warning, -s option given but default rule can be matched' means that it is possible (perhaps only in a particular start condi...

mysql command line. Empty set, 1 warning (0.01 sec)

How do i view the warning(s) after a SELECT query? The results of one query is Empty set, 1 warning (0.01 sec) I am using mysql via command line on linux. ...

Why warning in C and can't compile in C++?

Why does this code int (*g)(int); int (*h)(char); h = g; In C, give me such warning when compiling: 'warning: assignment from incompatible pointer type' In C++, can't be able to compile. ...

How to deal with -Wconversion warnings from GCC?

I'm building my project with GCC's -Wconversion warning flag. (gcc (Debian 4.3.2-1.1) 4.3.2) on a 64bit GNU/Linux OS/Hardware. I'm finding it useful in identifying where I've mixed types or lost clarity as to which types should be used. It's not so helpful in most of the other situations which activate it's warnings and I'm asking how a...

Suppressing Objective-C Warnings

Hi all, Is there any way to suppress Compiler warnings ?? Thanks ...

Module 'eAccelerator' already loaded php warning

I'm getting this PHP warning in my error_log and want to get it fixed. I'm told it is loaded within php.ini which I've verified as well as a bunch of configuration settings for the module. I'd like to maintain the module configuration in the place where it's loaded so I need to find out how else to remove it from the list. Unless remo...

Remove warning in MyEclipse

How can I modify the conditions for which MyEclipse will throw up warning flags? I'd be happy to hear a generic solution, but here is my specific problem for the curious/if it turns out to be relevant: <html xmlns="http://www.w3.org/1999/xhtml"&gt; <wicket:panel> <p> <object type="text/html" width="750" height="360" wicket:id="htmlRend...

SnowLeopard Xcode warning: "format not a string literal and no format arguments"

Since upgrading to the latest XCode 3.2.1 and SnowLeopard, I've been getting the warning, "format not a string literal and no format arguments" on the following: NSError *error = nil; if (![self.managedObjectContext save:&error]) { NSLog([NSString stringWithFormat:@"%@ %@, %@", errorMsgFormat, error, ...

C - Excess elements in array

Hey, I am learning C and I am playing around with pointers and arrays. I am trying to create an array of pointers with the code below: const int NUM_P = 50; // Line 10 char *pS[NUM_P] = { NULL }; // Line 11 I am getting the following warnings and errors when I compile: → gcc array.c -o array array.c: In function ‘main’: array.c:11:...

Why does Perl complain about "Use of uninitialized value" in my CGI script?

I am cleaning my Perl code for production release and came across a weird warning in the Apache error log. It says: [Thu Nov 5 15:19:02 2009] Clouds.pm: Use of uninitialized value $name in substitution (s///) at /home/mike/workspace/olefa/mod-bin/OSA/Clouds.pm line 404. The relevant code is here: my $name = shift @_; my $nam...

Besides "treat warnings as errors" and fixing memory leaks, what other ideas should we implement as part of our coding standards?

First let me say, I am not a coder but I help manage a coding team. No one on the team has more than about 5 years experience, and most of them have only worked for this company.. So we are flying a bit blind, hence the question. We are trying to make our software more stable and are looking to implement some "best practices" and codin...

Any way to silence the UIDevice setOrientation warning?

Anyone have a simple way to silence the undocumented UIDevice setOrientation warning? I found this piece of code that silences the undocumented UIPickerView setSoundsEnabled warning. ...

How to get rid of these warnings after installing zend core?

Really annoying! PHP Warning: PHP Startup: bcmath: Unable to initialize module Module compiled with module API=20060613, debug=0, thread-safety=0 PHP compiled with module API=20060613, debug=0, thread-safety=1 These options need to match in Unknown on line 0 PHP Warning: PHP Startup: curl: Unable to initialize module Module compil...