You can turn on/off particular warnings. Here is an alignment warning, but in a situation where the code actually does generate an aligned address, but the compiler can't convince itself:#pragma clang diagnostic push #pragma clang diagnostic ignored "-Wcast-align" scan = (fileinfo *) (((char *) scan) + scan->length); #pragma clang diagnostic pop