2025-11-21 13:04 ftp://ftp.de.debian.org/debian/pool/main/g/gl4es/gl4es_1.1.6+ds.orig.tar.xz cppcheck-options: --library=posix --library=gnu --library=bsd --library=motif --library=opengl --inconclusive --enable=style,information --inline-suppr --template=daca2 --disable=missingInclude --suppress=unmatchedSuppression --check-library --debug-warnings --suppress=autoNoType --suppress=valueFlowBailout --suppress=bailoutUninitVar --suppress=symbolDatabaseWarning --suppress=normalCheckLevelConditionExpressions -D__GNUC__ --platform=unix64 -j4 platform: Linux-5.4.0-216-generic-x86_64-with-glibc2.29 python: 3.8.10 client-version: 1.3.69 compiler: g++ (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0 cppcheck: head 2.18.0 head-info: 5374cd3 (2025-11-20 15:35:39 +0100) count: 70 70 elapsed-time: 14.7 16.3 head-timing-info: old-timing-info: head results: gl4es-1.1.6/src/agl/agl.c:40:9: error: Common realloc mistake: 'agl_context' nulled but not freed upon failure [memleakOnRealloc] gl4es-1.1.6/src/agl/agl.c:35:16: warning: If memory allocation fails, then there is a possible null pointer dereference: agl_context [nullPointerOutOfMemory] gl4es-1.1.6/src/agl/agl.c:34:47: note: Assuming allocation function fails gl4es-1.1.6/src/agl/agl.c:34:23: note: Assignment 'agl_context=(struct agl_ctx_glstate*)malloc(sizeof(struct agl_ctx_glstate)*agl_context_cap)', assigned value is 0 gl4es-1.1.6/src/agl/agl.c:35:16: note: Null pointer dereference gl4es-1.1.6/src/agl/agl.c:57:31: style: Parameter 'ctx' can be declared as pointer to const [constParameterPointer] gl4es-1.1.6/src/egl/lookup.c:15:20: style: Parameter 'x' can be declared as pointer to const [constParameterPointer] gl4es-1.1.6/src/agl/amigaos.c:33:64: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable MainInterface [valueFlowBailoutIncompleteVar] gl4es-1.1.6/src/gl/arbhelper.h:221:1: error: There is an unknown macro here somewhere. Configuration is required. If KHASH_MAP_DECLARE_STR is a macro then please configure it. [unknownMacro] gl4es-1.1.6/src/agl/amigaos.c:33:40: portability: Casting non-zero decimal integer literal to pointer. [intToPointerCast] gl4es-1.1.6/src/gl/state.h:362:1: error: There is an unknown macro here somewhere. Configuration is required. If KHASH_MAP_DECLARE_INT is a macro then please configure it. [unknownMacro] gl4es-1.1.6/src/gl/stb_dxt_104.h:95:63: style: Parameter 'p1' can be declared as pointer to const [constParameterPointer] gl4es-1.1.6/src/gl/stb_dxt_104.h:95:82: style: Parameter 'p2' can be declared as pointer to const [constParameterPointer] gl4es-1.1.6/src/gl/stb_dxt_104.h:151:22: style: Variable 'quant' can be declared as pointer to const [constVariablePointer] gl4es-1.1.6/src/gl/stb_dxt_104.h:170:58: style: Parameter 'block' can be declared as pointer to const [constParameterPointer] gl4es-1.1.6/src/gl/stb_dxt_104.h:170:80: style: Parameter 'color' can be declared as pointer to const [constParameterPointer] gl4es-1.1.6/src/gl/stb_dxt_104.h:270:18: style: Variable 'minp' can be declared as pointer to const [constVariablePointer] gl4es-1.1.6/src/gl/stb_dxt_104.h:270:25: style: Variable 'maxp' can be declared as pointer to const [constVariablePointer] gl4es-1.1.6/src/gl/stb_dxt_104.h:382:44: style: Parameter 'block' can be declared as pointer to const [constParameterPointer] gl4es-1.1.6/src/gl/stb_dxt_104.h:535:72: style: Parameter 'src' can be declared as pointer to const [constParameterPointer] gl4es-1.1.6/src/gl/decompress.c:255:29: warning: Shifting 32-bit value by 4294967293 bits is undefined behaviour. See condition at line 250. [shiftTooManyBits] gl4es-1.1.6/src/gl/decompress.c:250:23: note: Assuming that condition 'alphaCodeIndex<=12' is not redundant gl4es-1.1.6/src/gl/decompress.c:255:29: note: Shift gl4es-1.1.6/src/gl/decompress.c:255:48: warning: Either the condition 'alphaCodeIndex<=12' is redundant or there is signed integer overflow for expression 'alphaCodeIndex-16'. [integerOverflowCond] gl4es-1.1.6/src/gl/decompress.c:250:23: note: Assuming that condition 'alphaCodeIndex<=12' is not redundant gl4es-1.1.6/src/gl/decompress.c:255:48: note: Integer overflow gl4es-1.1.6/src/gl/decompress.c:255:48: warning: Expression 'alphaCodeIndex-16' can have a negative value. That is converted to an unsigned value and used in an unsigned calculation. [signConversionCond] gl4es-1.1.6/src/gl/decompress.c:250:23: note: Assuming that condition 'alphaCodeIndex<=12' is not redundant gl4es-1.1.6/src/gl/decompress.c:255:48: note: Negative value is converted to an unsigned value gl4es-1.1.6/src/gl/stb_dxt_104.h:367:27: warning: Uninitialized variable: maxp [uninitvar] gl4es-1.1.6/src/gl/stb_dxt_104.h:361:15: note: Assuming condition is false gl4es-1.1.6/src/gl/stb_dxt_104.h:367:27: note: Uninitialized variable: maxp gl4es-1.1.6/src/gl/stb_dxt_104.h:368:27: warning: Uninitialized variable: minp [uninitvar] gl4es-1.1.6/src/gl/stb_dxt_104.h:356:15: note: Assuming condition is false gl4es-1.1.6/src/gl/stb_dxt_104.h:368:27: note: Uninitialized variable: minp gl4es-1.1.6/src/gl/fpe_cache.c:50:5: error: There is an unknown macro here somewhere. Configuration is required. If kh_foreach_value is a macro then please configure it. [unknownMacro] gl4es-1.1.6/src/gl/fpe.c:280:5: error: There is an unknown macro here somewhere. Configuration is required. If kh_foreach is a macro then please configure it. [unknownMacro] gl4es-1.1.6/src/gl/glstate.c:488:5: error: syntax error [syntaxError] gl4es-1.1.6/src/gl/list.c:652:13: error: syntax error [syntaxError] gl4es-1.1.6/src/gl/listdraw.c:471:13: error: There is an unknown macro here somewhere. Configuration is required. If kh_foreach_value is a macro then please configure it. [unknownMacro] gl4es-1.1.6/src/gl/preproc.c:817:26: error: syntax error [syntaxError] gl4es-1.1.6/src/gl/program.c:223:9: error: There is an unknown macro here somewhere. Configuration is required. If kh_foreach_value is a macro then please configure it. [unknownMacro] gl4es-1.1.6/src/gl/queries.c:52:5: error: There is an unknown macro here somewhere. Configuration is required. If kh_foreach_value is a macro then please configure it. [unknownMacro] gl4es-1.1.6/src/gl/shader_hacks.c:517:68: warning: If memory allocation fails, then there is a possible null pointer dereference: Tmp [nullPointerOutOfMemory] gl4es-1.1.6/src/gl/shader_hacks.c:517:49: note: Assuming allocation function fails gl4es-1.1.6/src/gl/shader_hacks.c:517:36: note: Assignment 'Tmp=(char*)malloc(*tmpsize)', assigned value is 0 gl4es-1.1.6/src/gl/shader_hacks.c:517:68: note: Null pointer dereference gl4es-1.1.6/src/gl/shader_hacks.c:531:60: warning: If memory allocation fails, then there is a possible null pointer dereference: Tmp [nullPointerOutOfMemory] gl4es-1.1.6/src/gl/shader_hacks.c:531:41: note: Assuming allocation function fails gl4es-1.1.6/src/gl/shader_hacks.c:531:28: note: Assignment 'Tmp=(char*)malloc(*tmpsize)', assigned value is 0 gl4es-1.1.6/src/gl/shader_hacks.c:531:60: note: Null pointer dereference gl4es-1.1.6/src/gl/shader_hacks.c:531:85: warning: If memory allocation fails, then there is a possible null pointer dereference: Tmp [nullPointerOutOfMemory] gl4es-1.1.6/src/gl/shader_hacks.c:531:41: note: Assuming allocation function fails gl4es-1.1.6/src/gl/shader_hacks.c:531:28: note: Assignment 'Tmp=(char*)malloc(*tmpsize)', assigned value is 0 gl4es-1.1.6/src/gl/shader_hacks.c:531:85: note: Null pointer dereference gl4es-1.1.6/src/gl/shader_hacks.c:558:67: warning: If memory allocation fails, then there is a possible null pointer dereference: Tmp [nullPointerOutOfMemory] gl4es-1.1.6/src/gl/shader_hacks.c:558:49: note: Assuming allocation function fails gl4es-1.1.6/src/gl/shader_hacks.c:558:36: note: Assignment 'Tmp=(char*)malloc(tmpsize)', assigned value is 0 gl4es-1.1.6/src/gl/shader_hacks.c:558:67: note: Null pointer dereference gl4es-1.1.6/src/gl/shader_hacks.c:508:34: style: Parameter 'shader' can be declared as pointer to const [constParameterPointer] gl4es-1.1.6/src/gl/shader_hacks.c:523:36: style: Parameter 'shader' can be declared as pointer to const [constParameterPointer] gl4es-1.1.6/src/gl/shader_hacks.c:555:15: style: Variable 'f' can be declared as pointer to const [constVariablePointer] gl4es-1.1.6/src/gl/fpe_shader.c:911:37: style:inconclusive: Boolean expression '!need->need_texs' is used in bitwise operation. Did you mean '&&'? [bitwiseOnBoolean] gl4es-1.1.6/src/gl/fpe_shader.c:911:37: style: Boolean result is used in bitwise operation. Clarify expression with parentheses. [clarifyCondition] gl4es-1.1.6/src/gl/string_utils.c:164:20: warning: Either the condition 'p' is redundant or there is pointer arithmetic with NULL pointer. [nullPointerArithmeticRedundantCheck] gl4es-1.1.6/src/gl/string_utils.c:164:13: note: Assuming that condition 'p' is not redundant gl4es-1.1.6/src/gl/string_utils.c:164:20: note: Null pointer addition gl4es-1.1.6/src/gl/string_utils.c:141:7: style: Redundant initialization for 'p'. The initialized value is overwritten before it is read. [redundantInitialization] gl4es-1.1.6/src/gl/string_utils.c:140:13: note: p is initialized gl4es-1.1.6/src/gl/string_utils.c:141:7: note: p is overwritten gl4es-1.1.6/src/gl/string_utils.c:208:11: style: Variable 'p2' can be declared as pointer to const [constVariablePointer] gl4es-1.1.6/src/gl/shaderconv.c:440:33: style:inconclusive: Function 'ConvertShader' argument 1 names different: declaration 'pBuffer' definition 'pEntry'. [funcArgNamesDifferent] gl4es-1.1.6/src/gl/shaderconv.h:7:33: note: Function 'ConvertShader' argument 1 names different: declaration 'pBuffer' definition 'pEntry'. gl4es-1.1.6/src/gl/shaderconv.c:440:33: note: Function 'ConvertShader' argument 1 names different: declaration 'pBuffer' definition 'pEntry'. gl4es-1.1.6/src/gl/shaderconv.c:1288:25: style: Local variable 'n' shadows outer variable [shadowVariable] gl4es-1.1.6/src/gl/shaderconv.c:1278:9: note: Shadowed declaration gl4es-1.1.6/src/gl/shaderconv.c:1288:25: note: Shadow variable gl4es-1.1.6/src/gl/shaderconv.c:1336:9: style: Local variable 'n' shadows outer variable [shadowVariable] gl4es-1.1.6/src/gl/shaderconv.c:1330:7: note: Shadowed declaration gl4es-1.1.6/src/gl/shaderconv.c:1336:9: note: Shadow variable gl4es-1.1.6/src/gl/shaderconv.c:1352:9: style: Local variable 'n' shadows outer variable [shadowVariable] gl4es-1.1.6/src/gl/shaderconv.c:1346:7: note: Shadowed declaration gl4es-1.1.6/src/gl/shaderconv.c:1352:9: note: Shadow variable gl4es-1.1.6/src/gl/shaderconv.c:460:7: style: Variable 'version120' is assigned a value that is never used. [unreadVariable] gl4es-1.1.6/src/gl/fpe_shader.c:393:22: style: Redundant condition: need. '!need || (need && need->need_color)' is equivalent to '!need || need->need_color' [redundantCondition] gl4es-1.1.6/src/gl/fpe_shader.c:1762:16: style: Condition 'alpha_test' is always true [knownConditionTrueFalse] gl4es-1.1.6/src/gl/fpe_shader.c:401:13: warning: %d in format string (no. 2) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] gl4es-1.1.6/src/gl/fpe_shader.c:401:13: warning: %d in format string (no. 3) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] gl4es-1.1.6/src/gl/fpe_shader.c:1389:13: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] gl4es-1.1.6/src/gl/fpe_shader.c:1389:13: warning: %d in format string (no. 2) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] gl4es-1.1.6/src/gl/fpe_shader.c:1389:13: warning: %d in format string (no. 3) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] gl4es-1.1.6/src/gl/fpe_shader.c:1389:13: warning: %d in format string (no. 4) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] gl4es-1.1.6/src/gl/fpe_shader.c:1389:13: warning: %d in format string (no. 5) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] gl4es-1.1.6/src/gl/fpe_shader.c:1389:13: warning: %d in format string (no. 6) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] gl4es-1.1.6/src/gl/wrap/glstub.c:50:1: style: Parameter 'pattern' can be declared as pointer to const [constParameterPointer] gl4es-1.1.6/src/gl/wrap/glstub.c:51:1: style: Parameter 'buffer' can be declared as pointer to const [constParameterPointer] gl4es-1.1.6/src/gl/wrap/glstub.c:52:1: style: Parameter 'flag' can be declared as pointer to const [constParameterPointer] gl4es-1.1.6/src/gl/fpe_shader.c:156:56: style: Parameter 'need' can be declared as pointer to const [constParameterPointer] gl4es-1.1.6/src/gl/fpe_shader.c:1630:77: style: Parameter 'state' can be declared as pointer to const [constParameterPointer] gl4es-1.1.6/src/gl/fpe_shader.c:176:9: style: Variable 'pointsprite' is assigned a value that is never used. [unreadVariable] gl4es-1.1.6/src/gl/fpe_shader.c:1663:9: style: Variable 'headline' is assigned a value that is never used. [unreadVariable] gl4es-1.1.6/src/glx/rpi.c:89:19: error: Memory leak: nativewindow [memleak] gl4es-1.1.6/src/glx/rpi.c:97:15: style: Local variable 'dst_rect' shadows outer variable [shadowVariable] gl4es-1.1.6/src/glx/rpi.c:52:18: note: Shadowed declaration gl4es-1.1.6/src/glx/rpi.c:97:15: note: Shadow variable gl4es-1.1.6/src/glx/rpi.c:97:25: style: Local variable 'src_rect' shadows outer variable [shadowVariable] gl4es-1.1.6/src/glx/rpi.c:53:18: note: Shadowed declaration gl4es-1.1.6/src/glx/rpi.c:97:25: note: Shadow variable gl4es-1.1.6/src/glx/rpi.c:35:28: style: struct member 'VC_DISPMANX_ALPHA_T::flags' is never used. [unusedStructMember] gl4es-1.1.6/src/glx/rpi.c:36:14: style: struct member 'VC_DISPMANX_ALPHA_T::opacity' is never used. [unusedStructMember] gl4es-1.1.6/src/glx/rpi.c:37:32: style: struct member 'VC_DISPMANX_ALPHA_T::mask' is never used. [unusedStructMember] diff: DONE