Skip to content

Instantly share code, notes, and snippets.

@scriptum
Last active December 27, 2015 17:09
Show Gist options
  • Save scriptum/7360333 to your computer and use it in GitHub Desktop.
Save scriptum/7360333 to your computer and use it in GitHub Desktop.
Geany code analysis by cppchech with my glib config
=== COMMANDLINE ===
$ ./cppcheck --max-configs=1 -q -j16 --library=gtk --enable=performance,portability,information,warning --template=gcc --inconclusive --std=posix ../geany/src/ `pkg-config --cflags glib-2.0`
=== LEAKS ===
../geany/src/keyfile.c:665: error: Memory leak: tmp_array !NOT SURE. g_ptr_array_add called even for NULL???
../geany/src/symbols.c:1093: error: Memory leak: buffer
../geany/src/build.c:830: error: Mismatching allocation and deallocation: argv !FALSE-POS
../geany/src/build.c:856: error: Mismatching allocation and deallocation: argv !FALSE-POS
../geany/src/build.c:2416: error: Memory leak: key
../geany/src/build.c:2633: error: Memory leak: key
../geany/src/utils.c:1062: error: Returning/dereferencing 'ioc' after it is deallocated / released !FALSE-POS (NOT SURE)
../geany/src/utils.c:1844: error: Memory leak: tmp
../geany/src/utils.c:739: portability: Non reentrant function 'localtime' called. For threadsafe applications it is recommended to use the reentrant replacement function 'localtime_r'.
../geany/src/utils.c:743: portability: Non reentrant function 'localtime' called. For threadsafe applications it is recommended to use the reentrant replacement function 'localtime_r'.
../geany/src/utils.c:1018: portability: Non reentrant function 'localtime' called. For threadsafe applications it is recommended to use the reentrant replacement function 'localtime_r'.
../geany/src/document.c:528: error: Memory leak: doc
../geany/src/document.c:1546: error: Memory leak: conv_file_contents !FALSE-POS - check pointer, not error?
== Some funny warnings ===
../geany/src/build.c:357: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'.
../geany/src/build.c:357: warning: %d in format string (no. 2) requires 'int' but the argument type is 'unsigned int'.
../geany/src/build.c:358: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'.
../geany/src/build.c:358: warning: %d in format string (no. 2) requires 'int' but the argument type is 'unsigned int'.
../geany/src/build.c:359: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'.
../geany/src/build.c:359: warning: %d in format string (no. 2) requires 'int' but the argument type is 'unsigned int'.
../geany/src/build.c:361: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'.
../geany/src/build.c:361: warning: %d in format string (no. 2) requires 'int' but the argument type is 'unsigned int'.
../geany/src/build.c:364: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'.
../geany/src/build.c:364: warning: %d in format string (no. 2) requires 'int' but the argument type is 'unsigned int'.
../geany/src/build.c:365: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'.
../geany/src/build.c:365: warning: %d in format string (no. 2) requires 'int' but the argument type is 'unsigned int'.
../geany/src/build.c:366: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'.
../geany/src/build.c:366: warning: %d in format string (no. 2) requires 'int' but the argument type is 'unsigned int'.
../geany/src/build.c:367: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'.
../geany/src/build.c:367: warning: %d in format string (no. 2) requires 'int' but the argument type is 'unsigned int'.
../geany/src/build.c:370: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'.
../geany/src/build.c:370: warning: %d in format string (no. 2) requires 'int' but the argument type is 'unsigned int'.
../geany/src/build.c:371: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'.
../geany/src/build.c:371: warning: %d in format string (no. 2) requires 'int' but the argument type is 'unsigned int'.
../geany/src/build.c:372: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'.
../geany/src/build.c:372: warning: %d in format string (no. 2) requires 'int' but the argument type is 'unsigned int'.
../geany/src/build.c:373: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'.
../geany/src/build.c:373: warning: %d in format string (no. 2) requires 'int' but the argument type is 'unsigned int'.
../geany/src/build.c:374: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'.
../geany/src/build.c:374: warning: %d in format string (no. 2) requires 'int' but the argument type is 'unsigned int'.
../geany/src/build.c:375: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'.
../geany/src/build.c:375: warning: %d in format string (no. 2) requires 'int' but the argument type is 'unsigned int'.
../geany/src/build.c:2417: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'.
../geany/src/build.c:2634: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment