Avoiding CodeQL warning.

Changed a statement emitted by Fluid to avoid 'unused'
warnings: if(w){} into (void)w; to avoid triggering 'Bad
error checking' warnings.
This commit is contained in:
Matthias Melcher
2022-01-11 11:56:49 +01:00
parent 42a93eb8de
commit d699b617ac
+3 -1
View File
@@ -2200,7 +2200,9 @@ void Fl_Widget_Type::write_code1() {
indentation++;
if (wused) write_c("%sw = o; if (w) {/* empty */}\n", indent());
// Avoid compiler warning for unused variable.
// Also avoid quality control warnings about incorrect allocation error handling.
if (wused) write_c("%sw = o; (void)w;\n", indent());
write_widget_code();
}