Top "Compiler-warnings" questions

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

Compiler warning - suggest parentheses around assignment used as truth value

When I try to compile the piece of code below, I get this warning: warning: suggest parentheses around assignment used …

c compiler-construction compiler-warnings
error C2220: warning treated as error - no 'object' file generated

I have below class class Cdata12Mnt { public: char IOBname[ID1_IOB_PIOTSUP-ID1_IOB_TOP][BOADNAM_MAX + 4]; char ExIOBname[ID1_…

c++ object compiler-errors project compiler-warnings
Multi-character constant warnings

Why is this a warning? I think there are many cases when is more clear to use multi-char int constants …

c++ c casting compiler-warnings portability
How can I hide "defined but not used" warnings in GCC?

I have a bunch of compile time asserts, such as: CASSERT(isTrue) or CASSERT2(isTrue, prefix_) When compiling with GCC …

gcc warnings compiler-warnings
How to disable unused code warnings in Rust?

struct SemanticDirection; fn main() {} warning: struct is never used: `SemanticDirection` --> src/main.rs:1:1 | 1 | struct SemanticDirection; | ^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: #[warn(dead_…

warnings compiler-warnings rust dead-code
c array - warning: format not a string literal

I'm attempting to learn C and already I've run into an issue. I assume its trivial but I need to …

c compiler-warnings
Unnecessary @SuppressWarnings("unused")

I'm getting a compiler warning for the @SuppressWarnings annotation in eclipse for the code: @Override public boolean doSomething(@SuppressWarnings("unused") …

java eclipse annotations compiler-warnings suppress-warnings
How can I suppress javac warnings about deprecated api?

When I compile, javac outputs: Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation …

java compiler-warnings javac
Override compile flags for single files

I would like to use a global set of flags for compiling a project, meaning that at my top-level CMakeLists.…

c++ cmake compiler-warnings
How to turn on (literally) ALL of GCC's warnings?

I would like to enable -- literally -- ALL of the warnings that GCC has. (You'd think it would be …

c++ gcc warnings compiler-warnings gcc-warning