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
49
votes
6 answers

Warnings: Misplaced View

I recently updated Xcode and I got the following warnings: I tried Editor -> Resolve Auto-Layout Issues -> Clear all constraints in view controller but it did not work... I am using Xcode 5. How do I remove the warnings?
Abdullah Shafique
  • 6,878
  • 8
  • 35
  • 70
48
votes
1 answer

Warning about non-NOTIFYable properties in QML

I have a QML based application in Qt that generates some warnings at runtime: QDeclarativeExpression: Expression "(function $text() { return pinyin })" depends on non-NOTIFYable properties: hanzi::DictionaryEntry::pinyin I believe it refers…
laurent
  • 88,262
  • 77
  • 290
  • 428
48
votes
0 answers

SwiftUI UITableView was told to layout its visible cells and other contents without in view hierarchy

I have a list in a view (lets call it view A) where I push a view B via NavigationLink from view A and manipulate the CurrentSubjectValue to the initial view A. The moment the data is added and the didChangd.send(value) is dispatched to view A I get…
Congruent Tech. UG
  • 1,408
  • 2
  • 12
  • 21
47
votes
3 answers

warning: format not a string literal and no format arguments

I want to remove the warning that i get on this line of the code, FILE *fil; char *imp; (...) fprintf(fil,imp); the thing is when i do this it writes on the file exactly what i want, but if i apply the format %s it doesn't, like this fprintf(fil,…
Unzi
  • 509
  • 1
  • 5
  • 5
47
votes
14 answers

Best compiler warning level for C/C++ compilers?

What compiler warning level do you recommend for different C/C++ compilers? gcc and g++ will let you get away with a lot on the default level. I find the best warning level for me is '-Wall'. And I always try to remove fix the code for the…
Juan
47
votes
2 answers

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
eold
  • 5,972
  • 11
  • 56
  • 75
47
votes
1 answer

How to find the line that is generating a Pandas SettingWithCopyWarning?

I have a large block of code that is, at some point somewhere, generating a setting with copy warning in pandas (this problem). I know how to fix the problem, but I can't find what line number it is! Is there a way to back out the line number (apart…
tim654321
  • 2,218
  • 2
  • 15
  • 19
46
votes
2 answers

Unable to apply publish properties?

I don't know what caused Visual Studio to start thinking it needs to publish my project, but now whenever I build it, I get several "Unable to apply publish properties for item 'blah'" warnings. How do I stop Visual Studio 2005's publishing…
jasonh
  • 29,297
  • 11
  • 59
  • 61
46
votes
4 answers

Portable UNUSED parameter macro used on function signature for C and C++

I'm interested in creating a macro for eliminating the unused variable warning. This question describes a way to suppress the unused parameter warning by writing a macro inside the function code: Universally compiler independent way of implementing…
Šimon Tóth
  • 35,456
  • 20
  • 106
  • 151
46
votes
7 answers

Xcode 12 deployment target warnings when using CocoaPods

I get this warning on Xcode 12: The iOS Simulator deployment target IPHONEOS_DEPLOYMENT_TARGET is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.0.99 How to support this version?
aturan23
  • 4,798
  • 4
  • 28
  • 52
46
votes
4 answers

Warning: X may be used uninitialized in this function

I am writing a custom "vector" struct. I do not understand why I'm getting a Warning: "one" may be used uninitialized here. This is my vector.h file #ifndef VECTOR_H #define VECTOR_H typedef struct Vector{ int a; int b; int…
Valentino Ru
  • 4,964
  • 12
  • 43
  • 78
45
votes
8 answers

What does the warning "redirecting to" actually mean?

I have noticed that sometimes when I git pull a project, there is a message saying: "warning: redirecting to " I tried searching what it means but I find nothing useful. What is it?
Makogan
  • 8,208
  • 7
  • 44
  • 112
45
votes
3 answers

narrowing conversion from unsigned to double

static_assert(sizeof(unsigned) == 4, ":("); static_assert(sizeof(double) == 8 ,":("); unsigned u{42}; double x{u}; g++ 4.7.1 complains about this code: warning: narrowing conversion of 'u' from 'unsigned int' to 'double' inside { } Why is this a…
fredoverflow
  • 256,549
  • 94
  • 388
  • 662
45
votes
4 answers

Is this a memory leak or a false positive?

This is my code: import java.io.BufferedReader; import java.io.FileNotFoundException; import java.io.FileReader; import java.util.Scanner; public class temp { public static void main(String[] args) throws FileNotFoundException { …
dln385
  • 11,630
  • 12
  • 48
  • 58
44
votes
1 answer

How can I fix "Freeform Size simulated metrics are not available prior to Xcode 4.2" warnings?

Since a couple of weeks, I've been using XCode 4.2 with projects created with previous XCode 3.x versions. When creating some custom iPad views, I often use the "freeform" attribute of Interface Builder to be able to have views with an arbitrary…
Mick F
  • 7,312
  • 6
  • 51
  • 98