warnings

Remove warning about ansicon from “rake cucumber”

烂漫一生 提交于 2019-12-23 12:45:57
问题 When you run any rake task with cucumber installed on a machine that doesn't have ANSICON installed, you get the following message: *** WARNING: You must use ANSICON 1.31 or higher (http://adoxa.110mb.com/ansicon) to get coloured output on Windows When running locally I like using ANSICON, but when used within the build server I don't care about that - and I don't want to see that warning there. Is there a way to get rid of it? 回答1: You can actually remove the warning itself. I do not like

What does -Wformat=2 do?

守給你的承諾、 提交于 2019-12-23 11:01:13
问题 I'm seeing numerous mentions on the web of a -Wformat=2 option to Clang, sometimes alongside the already-known -Wformat (the one that Xcode lists as “Typecheck calls to printf / scanf , although it covers many more string-formatting APIs now). Does this do anything at all? If it does, what, if anything, does it do differently from -Wformat ? Is it useful to have both, or is either one a superset of the other? 回答1: If it does, what, if anything, does it do differently from -Wformat? It's

Doxygen : Display warning for undocumented method

北城余情 提交于 2019-12-23 10:24:27
问题 i've activated warnings with doxygen WARNINGS = YES WARN_IF_UNDOCUMENTED = YES WARN_IF_DOC_ERROR = YES WARN_NO_PARAMDOC = YES But undocumented methods like this one: void AnimationManager::setAnimationTimeStep( double timeStep ) { ... } Do not throw any warning during doxygen generation. Is there any way to display warning in this situation ? Same problem with undocumented return , for example /** * @brief brief description */ bool AnimationManager::hasAnimationTimeStep( ) { ... } Does not

memset used with zero length parameter: ignore or watch out?

孤人 提交于 2019-12-23 10:09:16
问题 I'm having trouble finding any information regarding the following warning when linking a dynamic library: In function `MyClass::myfunc()': MyClass.cpp:(.text+0x14e4): warning: memset used with constant zero length parameter; this could be due to transposed parameters Here is an excerpt of myfunc : void MyClass::myfunc() { vector<Variable*>::const_iterator it; for (it = m_vars.begin(); it != m_vars.end(); ++it) { if ((*it)->recordme) { MyRecord* r = new MyRecord(*it); initMyRecord(*r); m

Warning: preg_match() [function.preg-match]: Unknown modifier 'v'

那年仲夏 提交于 2019-12-23 10:06:24
问题 I keep getting this error about 20 times in my wordpress blog about the same line of code. Here is the line of code that keeps getting the error. if ( preg_match( '/' . $id_base . '-([0-9]+)$/', $widget_id, $matches ) ) $number = max($number, $matches[1]); What could be wrong? 回答1: Your regex will break if the string $id_base has a / in it as you are using / as the regex delimiter. To fix this use preg_quote on $id_base as: if (preg_match('/'. preg_quote($id_base,'/').'-([0-9]+)$/', .....) {

Warning: strlen() expects parameter 1 to be string, array given [duplicate]

孤街浪徒 提交于 2019-12-23 09:42:17
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: mysql_fetch_array() expects parameter 1 to be resource, boolean given in select I' moving my website to a new host. The previous php version was 5.2 and now is 5.3. After I changed the php version, it shows the warning almost every page: strlen() expects parameter 1 to be string, array given The error line is the third line in this function: function implodestr($arr,$field) { unset($out_str); if (!is_array($arr)

Ignoring all warnings in an Eclipse project

时光总嘲笑我的痴心妄想 提交于 2019-12-23 09:29:07
问题 Suppose that you have a bunch of projects in your Eclipse workspace. Some are Java projects, some may be CDT projects, others may come from third party plugins such as TeXlipse or EPIC. You strive long and hard to produce quality code, yet in one specific project you have a couple of warnings, through no fault of your own - warnings that propagate up the chain to your working set and poke you in the eye. Is there a general way in Eclipse 3.7 to tell the IDE that it should ignore (and be quiet

The type parameter T is hiding the type T in <T> T[] toArray(T[] a) using Eclipse

与世无争的帅哥 提交于 2019-12-23 09:16:13
问题 Using eclipse 4.2 with Java 7 and trying to implement the following method of the List interface i got a warning. public <T> T[] toArray(T[] a) { return a; } The warning says : The type parameter T is hiding the type T Why ? How can i get rid of it ? 回答1: The List interface is also generic. Make sure that you are not also using T for the generic type in your class. Note that in http://docs.oracle.com/javase/6/docs/api/java/util/List.html, they use "E" for the class generic parameter and "T"

failed to open stream : Is a directory in

ε祈祈猫儿з 提交于 2019-12-23 09:01:40
问题 I am getting the following warnings on trying on move an uploaded file from the temp folder to the desired one using php Warning: move_uploaded_file(test/) [function.move-uploaded-file]: failed to open stream: Is a directory in /home/..../filename.php on line 69 Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/tmp/phpKrCpQw' to 'test/' in /home/..../filename.php on line 69 following are line nos 67 and 69 that are giving the error : $destination = "test/". $name;

How to treat a warning as an error in a Makefile?

旧街凉风 提交于 2019-12-23 09:00:00
问题 Is it possible to treat warnings as errors in a Makfile (and thus exit before Makefile proceeds) Furthermore, is it possible to filter out which warning yields an error? My use case: I want to use --warn-undefined-variables in combination with this so that Makefile will exit when a variable is undefined, which is a very common source of error. Obviously I don't want to manually check for each variable as this is error-prone/tedious. I couldn't find anything on this, but it's a pretty