mirror of
https://github.com/fltk/fltk.git
synced 2026-05-24 08:16:04 +08:00
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:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user