Questions tagged [warnings]

A warning is often issued on recognizing a potential high-risk situation, a probable misunderstanding, degraded service or imminent failure.

A warning-level error message shown by a compiler indicates a piece of code which the compiler recognizes as being potentially a problem, but which is syntactically correct such that the compiler is able to continue.

The seriousness of warning may vary from basically an error to something that could be considered just as bad programming style. Most of compilers provide keys to disable default warnings and may provide keys to enable warnings that are disabled by default (e.g. -Wall, -Wextra, -Werror).

5829 questions
54
votes
5 answers

"dereferencing type-punned pointer will break strict-aliasing rules" warning

I use a code where I cast an enum* to int*. Something like this: enum foo { ... } ... foo foobar; int *pi = reinterpret_cast(&foobar); When compiling the code (g++ 4.1.2), I get the following warning message: dereferencing type-punned pointer…
petersohn
  • 11,292
  • 13
  • 61
  • 98
53
votes
5 answers

How can I disable #pragma warnings?

While developing a C++ application, I had to use a third-party library which produced a huge amount of warnings related with a harmless #pragma directive being used. ../File.hpp:1: warning: ignoring #pragma ident In file included from…
Marcos Bento
  • 2,030
  • 4
  • 22
  • 19
53
votes
5 answers

Troubleshooting "The type parameter T is hiding the type T" warning

I am getting a warning in eclipse (the most recent version) for the following code. public interface A extends B { public T getObject(); } The warning appears at 'T' in 'A' and reads: "The type parameter T is hiding the type T". The…
nikdeapen
  • 1,581
  • 3
  • 15
  • 27
52
votes
13 answers

PHP error: php_network_getaddresses: getaddrinfo failed: (while getting information from other site.)

Trying to get information from an external source, I'm receiving the following error: Warning: php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in line #... Yesterday everything was fine, so what happened to this…
Imran Khan
  • 2,373
  • 2
  • 22
  • 35
52
votes
7 answers

data binding - safeUnbox warning

after i upgrade AS gradle version to 2.3.0, data binding encounter a warning : Warning:selectMap[index] is a boxed field but needs to be un-boxed to execute selectMap[index] ? @android:color/white : @android:color/transparent. This may cause NPE…
52
votes
4 answers

Android Studio Warning: Using incompatible plugins for the annotation processing

After update Android Studio to 2.3 version I have warning: Warning:Using incompatible plugins for the annotation processing: android-apt. This may result in an unexpected behavior. Any solutions? My app stopped working...
Kacper
  • 620
  • 1
  • 7
  • 16
52
votes
5 answers

Remove "Method is never used" warning for OnClick annotation in Android Studio

Sorry if this question has been asked before. I am using the Butterknife 5.0 with the latest version of Android Studio(0.5.7). How can I remove the "Method is never used" warning for methods that use the 'OnClick' Annotation of ButterKnife.I noticed…
TMS
  • 1,201
  • 1
  • 13
  • 20
51
votes
3 answers

warning : The following options were not recognized by any processor: '[dagger.fastInit, kapt.kotlin.generated]'

I get this warning when I try to run or build an app in Android Studio. Why am I getting this? Do I need to heed this warning? The following options were not recognized by any processor: '[dagger.fastInit, kapt.kotlin.generated]'
Bincy Baby
  • 3,941
  • 5
  • 36
  • 62
51
votes
6 answers

turn warning off in a cell jupyter notebook

I get some useless warnings in python 3 jupyter notebook. I want to turn off these warnings in a particular cell only, so not in the rest of the ipynb-file. Does someone know how to do this?
Marnix
  • 719
  • 1
  • 6
  • 14
51
votes
5 answers

Identifiers for Delphi's $WARN compiler directive

Delphi has a $WARN compiler directive that allows one to selectively enable or disable specific warnings. The Delphi 2009 help file describes the syntax: {$WARN identifier ON|OFF} But it only lists the identifiers for 6 warnings. I'd like to have…
Jan Goyvaerts
  • 21,379
  • 7
  • 60
  • 72
51
votes
18 answers

PostgreSQL: Warning: Console code page (437) differs from Windows code page (1252)

Using PostgreSQL when I connect to a db using \c testdb inside PostgreSQL Database SQL Prompt. I successfully connect to the db but getting the following warning: postgres-# \c testdb WARNING: Console code page (437) differs from Windows code page…
Yousuf Memon
  • 4,638
  • 12
  • 41
  • 57
51
votes
3 answers

Apple Interface Builder warning: The content rectangle doesn't lie entirely on screen with the menu and may not be completely visible for all screens

A warning comes up in a MainMenu.XIB dialogue box. It says: Object: window(window) ID: 371 Type: Illegal Configuration Issue: This windows content rectangle does not lie entirely on the screen with the menu bar and may not be completely visible…
Carlos
  • 511
  • 4
  • 3
50
votes
5 answers

How to disable ConvergenceWarning using sklearn?

I'm using GridSearchCV to optimize hyper-parameters for SVM. I set the maximum number of iterations because I can't wait several hours to get result. I know there will be convergence warnings. I just want to ignore these warnings and not show up in…
Bohan Xu
  • 513
  • 1
  • 4
  • 4
50
votes
8 answers

About inconsistent dll linkage

How can I remove this link warning? You can see code segment that causes this warning. static AFX_EXTENSION_MODULE GuiCtrlsDLL = { NULL, NULL }; //bla bla // Exported DLL initialization is run in context of running application extern "C" void…
baris.aydinoz
  • 1,902
  • 2
  • 18
  • 28
49
votes
9 answers

C warning Missing sentinel in function call

This is my warning. Missing sentinel in function call How i can remove it. i am using linux & gcc compiler.
ambika
  • 1,643
  • 5
  • 19
  • 18