I get the warning controlling expression is constant on assert statement like this:
controlling expression is constant
assert(... && \"error message\");
If it is LLVM based, then you can use something like this:
#pragma clang diagnostic push #pragma clang diagnostic ignored "-Wmultichar" char b = 'df'; // no warning. #pragma clang diagnostic pop
From Controlling Diagnostics via Pragmas.