warnings

Code contracts problem

Consider the following code : public class RandomClass { private readonly string randomString; public RandomClass(string randomParameter) { Contract.Requires(randomParameter != null); Contract.Ensures(this.randomString != null); this.randomString = randomParameter; } public string R...

Getting warning from C math library's pow function

I have the following function in my code: int numberOverflow(int bit_count, int num, int twos) { int min, max; if (twos) { min = (int) -pow(2, bit_count - 1); \\ line 145 max = (int) pow(2, bit_count - 1) - 1; } else { min = 0; max = (int) pow(2, bit_count) - 1; \\ line 149 ...

Warning: UITableViewCellContentView is implemented in both MyApp and UIKit ??

Hi, I don't know how to get rid of this warning. MyApp behaves strange sometimes and I wonder if this is the cause. (BTW: This app is kind of old, and I am trying to update it.) Class UITableViewCellContentView is implemented in both /Users/nacho4d/Library/Application Support/iPhone Simulator/4.1/Applications/7B19E973-1AE1-...

How to suppress boost::thread warnings with gcc ?

Hi, In my project, I recently decided to use boost::thread. My code compiles fine under Linux, but under Windows (either x86 or x64), I get the following warnings with gcc 4.5: In file included from C:\Boost\include\boost-1_44/boost/thread/shared_mutex.hpp:14:0, from C:\Boost\include\boost-1_44/boost/thread/detail/thre...

unchecked warning on Class<Collection>

Suppose I have the following method, which can be used to create a collection of a given type specified. private static Collection<?> void create(Class<? extends Collection<?>> cls) { return cls.newInstance(); } This is all good if the cls argument is passed in during runtime: List<String> list = new LinkedList<String>(); create(...

Python Warning, possibly Numpy

As I run my code I get these warnings, allways in groups of four, sporadicly. I have tried to locate the source by placing debug messages before and after sertain statements to pin-point its origin. Warning: invalid value encountered in double_scalars Warning: invalid value encountered in double_scalars Warning: invalid value encountere...

How to find assignments with no effect?

In the process of automatically renaming many variables in a big project I may have created a lot of things like these: class Foo { int Par; void Bar(int Par) { Par = Par; // Nonsense } }; Now I need to identify those locations to correct them. E.g. into "this->Par = Par;". Unfortunately the Visual C++ Compil...

How do I suppress warnings in Eclipse for PHP?

In Eclipse, I'm getting warnings for not having a start tag (<div>) because the start tag is in another file. How do I suppress this warning to keep it out of my "Problems" window? I know in Java I could do @SuppressWarning, but I don't know how for php. I assume that there is, based on the availability of php type hinting in Eclipse,...

htmlspecialchars(): Invalid multibyte sequence in argument

Hi there, I am getting this error in my local site. Warning (2): htmlspecialchars(): Invalid multibyte sequence in argument in [/var/www/html/cake/basics.php, line 207] Does anyone knows, what is the problem or what should be the solution for this? Thanks. ...

weird iphone error.. urgent help needed

Warning: Cannot insert breakpoint 2. Error accessing memory address 0x96ba5efe: Unknown error: -1. Data Formatters temporarily unavailable, will re-try after a 'continue'. (Cannot call into the loader at present, it is locked.) Can anyone help me out with this? It is giving me this error every time I debug on the device but never on th...

Make a constructor warn the developer of improper value?

Private _bgWorker As BackgroundWorker = Nothing Private _bgWorkerMessage As String = String.Empty Private _bgPercentComplete As Integer = 0 Private _dictQueries As Dictionary(Of String, String) = New Dictionary(Of String, String) Public Sub New() _dictQueries.Add("IPB", "") _dictQueries.Add("Figure", "") _dictQueries.Add("Pa...

Can I adjust the memory warning level for iphone/ipad app?

Hello all iOs will give memory warning (level 1, 2, ...) for the apps. Can I change the level criterial? I mean for e.g., level 1 = 20 mb left, level 2 = 2 mb left. I can tell iOs level 1 = 50 mb left? thanks ...

PHP warning magic method set() class.XMLHttpRequest.php

i have a php script that runs perfectly but i get 2 errors: Warning: The magic method __set() must have public visibility and cannot be static in C:\wamp\www\class.XMLHttpRequest.php on line 63 Warning: The magic method __get() must have public visibility and cannot be static in C:\wamp\www\class.XMLHttpRequest.php on line 89...

Why am I getting this warning from GHCi?

I'm getting a curious warning when pattern matching, but only when OverloadedStrings is enabled... $ ghci -Wall GHCi, version 6.12.1: http://www.haskell.org/ghc/ :? for help Loading package ghc-prim ... linking ... done. Loading package integer-gmp ... linking ... done. Loading package base ... linking ... done. Prelude> let f x = case...

Why is this comparison always true?

I have the following code in my file: unsigned char * pData = new unsigned char... ... if(pData[0] >= 160 && pData[0] <= 255) When I compile it, I get a warning from the compiler (gcc): Warning: comparison is always true due to limited range of data type How can this be? Isn't the range of an unsigned char 0-255? I'm confused....

In Lisp, how do I fix "Warning: Assumed Special?"

In this file I get 9 warnings of "assumed special". They are ;;;*** Warning in CHECK-ROW: CHECKARRAY assumed special in SETQ ;;;*** Warning in CHECK-ROW: RESULT assumed special in SETQ ;;;*** Warning in CHECK-ROW: CHECKARRAY assumed special ;;;*** Warning in CHECK-ROW: CHECKARRAY assumed special ;;;*** Warning in CHECK-ROW: CHECKARRAY a...

How do you correct Module already loaded UserWarnings in Python?

Getting the following kinds of warnings when running most python scripts in the command line: /Library/Python/2.6/site-packages/virtualenvwrapper/hook_loader.py:16: UserWarning: Module pkg_resources was already imported from /System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/pkg_resources.pyc, but /Library/Pyth...

Should GUI application warning messages be sent to std::cerr?

Should a Unix GUI application's warning be sent to std::cerr or std::cout? This presumes that GUI normally presents the warnings and errors in a console window and also sends them to a log file. But in the case that the console is missing and thus cannot be used should std::cerr, std::cout, or std::clog be used for such messages? I'm ...

Ifort suppress unused variable warning, leave all others intact

i use ifort and gfortran to compile my Fortran program. However i also use a coworkers source and he has got a lot of unused variables. How can i suppress these for the compile, seeing as they are not really an error? However i dont want to disable -pedantic and -stan in the compiler options and thus want all the other warnings. ch...

returning address or local variable or temporary C++ warning

Possible Duplicate: c++ warning: address of local variable Hi, When i write this code: //Returns the transpose matrix of this one SparseMatrix& SparseMatrix::transpose()const{ vector<Element> result; size_t i; for(i=0;i<_matrix.size();++i){ result.push_back(Element(_matrix.at(i)._col, _matrix.at(i)._row, _...