Skip to main content


PSA: Improvements to #GCC's static analyzer are going to cause (at least) `g_error()` to throw an error about an infinite loop.

Wrap the call in a few pragmas:

```c
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wanalyzer-infinite-loop"
g_error ("Just like this");
#pragma GCC diagnostic pop
```

https://gcc.gnu.org/onlinedocs/gcc/Diagnostic-Pragmas.html

#GNOME #GLib #C #StaticAnalyzer

in reply to Andy Holmes

@pwithnall is this something GLib would accept a patch for?

If so, I can submit one after dinner.