Skip to main content

Search

Items tagged with: staticanalyzer


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