Top "Compiler-warnings" questions

Messages emitted by a compiler which indicate potential problems in code or configuration.

Ambiguity in Word Interop code

I recently posted a question about reading Word files here. The app runs fine however I get this Warning message; …

c# ms-word vsto compiler-warnings
Compiler gets warnings when using strptime function (C)

Typing man strptime it sais that this function needs to have declared _XOPEN_SOURCE and included time.h header. I …

c compiler-warnings strptime
C++ Warning: anonymous type with no linkage used to declare variable

I see this warning message when compiling (gcc 4.6.3, ubuntu) the example: struct { } a; int main() { } warning: anonymous type with no …

c++ g++ compiler-warnings linkage
After Updating Android Studio 3.1, I am getting these warnings after each build

Android Issues Warnings Stripped invalid locals information from 1 method. Stripped invalid locals information from 1 method. Message{kind=WARNING, text=Stripped …

android android-studio compiler-warnings android-proguard android-studio-3.1
"Recursive on All Control Paths" error when implementing factorial function

For class I have an assignment: Write a C++ program that will output the number of distinct ways in which …

c++ recursion stack-overflow compiler-warnings factorial
Can you add custom compiler warnings in Objective-C?

(I found the answer to this elsewhere while writing the question, but I thought it might be helpful to others …

objective-c xcode compiler-construction compiler-warnings
Visual Studio 2010 (C++): suppress C4706 warning temporarily

When you compile the following C++ source file in Visual Studio 2010 with warning level /W4 enabled #include <cstdio> // …

visual-studio visual-studio-2010 visual-c++ compiler-warnings suppress-warnings
Dereferencing pointer does break strict anti-aliasing rules using Berkeley sockets

I've got code that looks something like this, where addr is a sockaddr*: struct sockaddr_in *sin = (struct sockaddr_in *) …

c compiler-warnings berkeley-sockets
Java: if statement can be simplified (box contains point)

I have the following statement to check if a Vector2D is within a box, and IntelliJ gives me a …

java if-statement compiler-warnings simplify
Does there exist a static_warning?

I'm aware of this question which mentions Boost's "STATIC WARNING", but I'd like to ask again, specifically, how I could …

c++ static compiler-warnings