2025-05-08 11:32 ftp://ftp.de.debian.org/debian/pool/main/t/tofi/tofi_0.9.1.orig.tar.gz cppcheck-options: --library=posix --library=gnu --library=bsd --library=gtk --library=bsd --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 -j3 platform: Linux-6.8.0-1022-oracle-aarch64-with-glibc2.39 python: 3.12.3 client-version: 1.3.67 compiler: g++ (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0 cppcheck: head 2.17.0 head-info: ebc80c0 (2025-05-07 18:59:31 +0200) count: 219 219 elapsed-time: 3.4 3.5 head-timing-info: old-timing-info: head results: tofi-0.9.1/src/color.c:17:2: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] tofi-0.9.1/src/compgen.c:55:2: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] tofi-0.9.1/src/compgen.c:71:2: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] tofi-0.9.1/src/compgen.c:124:2: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] tofi-0.9.1/src/compgen.c:195:24: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable S_IXUSR [valueFlowBailoutIncompleteVar] tofi-0.9.1/src/color.c:19:8: style: Variable 'str' can be declared as const array [constVariable] tofi-0.9.1/src/color.c:33:8: style: Variable 'str' can be declared as const array [constVariable] tofi-0.9.1/src/compgen.c:190:16: portability: Non reentrant function 'readdir' called. For threadsafe applications it is recommended to use the reentrant replacement function 'readdir_r'. [prohibitedreaddirCalled] tofi-0.9.1/src/compgen.c:33:4: warning: If memory allocation fails, then there is a possible null pointer dereference: cache_name [nullPointerOutOfMemory] tofi-0.9.1/src/compgen.c:31:23: note: Assuming allocation function fails tofi-0.9.1/src/compgen.c:31:23: note: Assignment 'cache_name=xmalloc(len)', assigned value is 0 tofi-0.9.1/src/compgen.c:33:4: note: Null pointer dereference tofi-0.9.1/src/compgen.c:44:4: warning: If memory allocation fails, then there is a possible null pointer dereference: cache_name [nullPointerOutOfMemory] tofi-0.9.1/src/compgen.c:42:23: note: Assuming allocation function fails tofi-0.9.1/src/compgen.c:42:23: note: Assignment 'cache_name=xmalloc(len)', assigned value is 0 tofi-0.9.1/src/compgen.c:44:4: note: Null pointer dereference tofi-0.9.1/src/compgen.c:94:12: warning: If memory allocation fails, then there is a possible null pointer dereference: cache [nullPointerOutOfMemory] tofi-0.9.1/src/compgen.c:92:23: note: Assuming allocation function fails tofi-0.9.1/src/compgen.c:92:23: note: Assignment 'cache=xmalloc(size+1)', assigned value is 0 tofi-0.9.1/src/compgen.c:94:12: note: Null pointer dereference tofi-0.9.1/src/compgen.c:224:2: warning: If memory allocation fails, then there is a possible null pointer dereference: buf [nullPointerOutOfMemory] tofi-0.9.1/src/compgen.c:219:21: note: Assuming allocation function fails tofi-0.9.1/src/compgen.c:219:21: note: Assignment 'buf=xmalloc(buf_len+1)', assigned value is 0 tofi-0.9.1/src/compgen.c:224:2: note: Null pointer dereference tofi-0.9.1/src/compgen.c:189:19: style: Variable 'd' can be declared as pointer to const [constVariablePointer] tofi-0.9.1/src/compgen.c:233:33: style: Variable 'str1' can be declared as pointer to const [constVariablePointer] tofi-0.9.1/src/compgen.c:234:33: style: Variable 'str2' can be declared as pointer to const [constVariablePointer] tofi-0.9.1/src/drun.c:228:2: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] tofi-0.9.1/src/drun.c:340:28: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdout [valueFlowBailoutIncompleteVar] tofi-0.9.1/src/desktop_vec.c:62:3: error: Memory leak: file [memleak] tofi-0.9.1/src/desktop_vec.c:85:4: warning: If memory allocation fails, then there is a possible null pointer dereference: keywords [nullPointerOutOfMemory] tofi-0.9.1/src/desktop_vec.c:84:21: note: Assuming allocation function fails tofi-0.9.1/src/desktop_vec.c:84:21: note: Assignment 'keywords=xmalloc(1)', assigned value is 0 tofi-0.9.1/src/desktop_vec.c:85:4: note: Null pointer dereference tofi-0.9.1/src/desktop_vec.c:57:47: style:inconclusive: Function 'desktop_vec_add_file' argument 1 names different: declaration 'desktop' definition 'vec'. [funcArgNamesDifferent] tofi-0.9.1/src/desktop_vec.h:33:47: note: Function 'desktop_vec_add_file' argument 1 names different: declaration 'desktop' definition 'vec'. tofi-0.9.1/src/desktop_vec.c:57:47: note: Function 'desktop_vec_add_file' argument 1 names different: declaration 'desktop' definition 'vec'. tofi-0.9.1/src/desktop_vec.c:120:33: style: Variable 'd1' can be declared as pointer to const [constVariablePointer] tofi-0.9.1/src/desktop_vec.c:121:33: style: Variable 'd2' can be declared as pointer to const [constVariablePointer] tofi-0.9.1/src/desktop_vec.c:127:33: style: Variable 'str1' can be declared as pointer to const [constVariablePointer] tofi-0.9.1/src/desktop_vec.c:128:33: style: Variable 'str2' can be declared as pointer to const [constVariablePointer] tofi-0.9.1/src/desktop_vec.c:140:76: style: Parameter 'vec' can be declared as pointer to const [constParameterPointer] tofi-0.9.1/src/desktop_vec.c:211:9: style: Variable 'id' can be declared as pointer to const [constVariablePointer] tofi-0.9.1/src/desktop_vec.c:217:9: style: Variable 'keywords' can be declared as pointer to const [constVariablePointer] tofi-0.9.1/src/desktop_vec.c:225:52: style: Parameter 'vec' can be declared as pointer to const [constParameterPointer] tofi-0.9.1/src/desktop_vec.c:254:9: style: Variable 'desktop' can be declared as pointer to const [constVariablePointer] tofi-0.9.1/src/drun.c:139:17: portability: Non reentrant function 'readdir' called. For threadsafe applications it is recommended to use the reentrant replacement function 'readdir_r'. [prohibitedreaddirCalled] tofi-0.9.1/src/drun.c:286:3: error: Memory leak: file [memleak] tofi-0.9.1/src/drun.c:38:4: warning: If memory allocation fails, then there is a possible null pointer dereference: cache_name [nullPointerOutOfMemory] tofi-0.9.1/src/drun.c:36:23: note: Assuming allocation function fails tofi-0.9.1/src/drun.c:36:23: note: Assignment 'cache_name=xmalloc(len)', assigned value is 0 tofi-0.9.1/src/drun.c:38:4: note: Null pointer dereference tofi-0.9.1/src/drun.c:49:4: warning: If memory allocation fails, then there is a possible null pointer dereference: cache_name [nullPointerOutOfMemory] tofi-0.9.1/src/drun.c:47:23: note: Assuming allocation function fails tofi-0.9.1/src/drun.c:47:23: note: Assignment 'cache_name=xmalloc(len)', assigned value is 0 tofi-0.9.1/src/drun.c:49:4: note: Null pointer dereference tofi-0.9.1/src/drun.c:77:4: warning: If memory allocation fails, then there is a possible null pointer dereference: base_paths [nullPointerOutOfMemory] tofi-0.9.1/src/drun.c:75:23: note: Assuming allocation function fails tofi-0.9.1/src/drun.c:75:23: note: Assignment 'base_paths=xmalloc(len)', assigned value is 0 tofi-0.9.1/src/drun.c:77:4: note: Null pointer dereference tofi-0.9.1/src/drun.c:88:4: warning: If memory allocation fails, then there is a possible null pointer dereference: base_paths [nullPointerOutOfMemory] tofi-0.9.1/src/drun.c:86:23: note: Assuming allocation function fails tofi-0.9.1/src/drun.c:86:23: note: Assignment 'base_paths=xmalloc(len)', assigned value is 0 tofi-0.9.1/src/drun.c:88:4: note: Null pointer dereference tofi-0.9.1/src/drun.c:104:12: warning: If memory allocation fails, then there is a possible null pointer dereference: apps [nullPointerOutOfMemory] tofi-0.9.1/src/drun.c:103:23: note: Assuming allocation function fails tofi-0.9.1/src/drun.c:103:23: note: Assignment 'apps=xmalloc(len)', assigned value is 0 tofi-0.9.1/src/drun.c:104:12: note: Null pointer dereference tofi-0.9.1/src/drun.c:178:25: warning: If memory allocation fails, then there is a possible null pointer dereference: id [nullPointerOutOfMemory] tofi-0.9.1/src/drun.c:177:22: note: Assuming allocation function fails tofi-0.9.1/src/drun.c:177:22: note: Assignment 'id=xstrdup(&entry->fts_path[prefix_len])', assigned value is 0 tofi-0.9.1/src/drun.c:178:25: note: Null pointer dereference tofi-0.9.1/src/drun.c:238:11: warning: If resource allocation fails, then there is a possible null pointer dereference: cache [nullPointerOutOfResources] tofi-0.9.1/src/drun.c:236:23: note: Assuming allocation function fails tofi-0.9.1/src/drun.c:236:23: note: Assignment 'cache=fopen(cache_path,"wb")', assigned value is 0 tofi-0.9.1/src/drun.c:238:11: note: Null pointer dereference tofi-0.9.1/src/drun.c:270:10: warning: If resource allocation fails, then there is a possible null pointer dereference: cache [nullPointerOutOfResources] tofi-0.9.1/src/drun.c:268:22: note: Assuming allocation function fails tofi-0.9.1/src/drun.c:268:22: note: Assignment 'cache=fopen(cache_path,"wb")', assigned value is 0 tofi-0.9.1/src/drun.c:270:10: note: Null pointer dereference tofi-0.9.1/src/drun.c:275:10: warning: If resource allocation fails, then there is a possible null pointer dereference: cache [nullPointerOutOfResources] tofi-0.9.1/src/drun.c:273:22: note: Assuming allocation function fails tofi-0.9.1/src/drun.c:273:22: note: Assignment 'cache=fopen(cache_path,"rb")', assigned value is 0 tofi-0.9.1/src/drun.c:275:10: note: Null pointer dereference tofi-0.9.1/src/drun.c:167:42: error: Null pointer dereference [nullPointer] tofi-0.9.1/src/drun.c:99:8: style: Variable 'path_entry' can be declared as pointer to const [constVariablePointer] tofi-0.9.1/src/drun.c:138:20: style: Variable 'd' can be declared as pointer to const [constVariablePointer] tofi-0.9.1/src/drun.c:303:8: style: Variable 'last' can be declared as pointer to const [constVariablePointer] tofi-0.9.1/src/drun.c:379:33: style: Variable 'app1' can be declared as pointer to const [constVariablePointer] tofi-0.9.1/src/drun.c:380:33: style: Variable 'app2' can be declared as pointer to const [constVariablePointer] tofi-0.9.1/src/entry.c:65:4: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable CAIRO_FORMAT_ARGB32 [valueFlowBailoutIncompleteVar] tofi-0.9.1/src/entry.c:276:25: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable CAIRO_OPERATOR_SOURCE [valueFlowBailoutIncompleteVar] tofi-0.9.1/src/entry_backend/harfbuzz.c:76:34: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable HB_DIRECTION_LTR [valueFlowBailoutIncompleteVar] tofi-0.9.1/src/entry_backend/harfbuzz.c:99:47: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable cairo_glyph_t [valueFlowBailoutIncompleteVar] tofi-0.9.1/src/entry_backend/harfbuzz.c:365:37: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable cluster [valueFlowBailoutIncompleteVar] tofi-0.9.1/src/entry_backend/harfbuzz.c:580:4: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable HB_OT_METRICS_TAG_UNDERLINE_OFFSET [valueFlowBailoutIncompleteVar] tofi-0.9.1/src/entry_backend/pango.c:192:36: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable PANGO_SCALE [valueFlowBailoutIncompleteVar] tofi-0.9.1/src/entry_backend/pango.c:238:23: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable PANGO_SCALE [valueFlowBailoutIncompleteVar] tofi-0.9.1/src/entry_backend/harfbuzz.c:112:3: warning: If memory allocation fails, then there is a possible null pointer dereference: cairo_glyphs [nullPointerOutOfMemory] tofi-0.9.1/src/entry_backend/harfbuzz.c:99:39: note: Assuming allocation function fails tofi-0.9.1/src/entry_backend/harfbuzz.c:99:39: note: Assignment 'cairo_glyphs=xmalloc(sizeof(cairo_glyph_t)*glyph_count)', assigned value is 0 tofi-0.9.1/src/entry_backend/harfbuzz.c:112:3: note: Null pointer dereference tofi-0.9.1/src/entry_backend/harfbuzz.c:113:3: warning: If memory allocation fails, then there is a possible null pointer dereference: cairo_glyphs [nullPointerOutOfMemory] tofi-0.9.1/src/entry_backend/harfbuzz.c:99:39: note: Assuming allocation function fails tofi-0.9.1/src/entry_backend/harfbuzz.c:99:39: note: Assignment 'cairo_glyphs=xmalloc(sizeof(cairo_glyph_t)*glyph_count)', assigned value is 0 tofi-0.9.1/src/entry_backend/harfbuzz.c:113:3: note: Null pointer dereference tofi-0.9.1/src/entry_backend/harfbuzz.c:114:3: warning: If memory allocation fails, then there is a possible null pointer dereference: cairo_glyphs [nullPointerOutOfMemory] tofi-0.9.1/src/entry_backend/harfbuzz.c:99:39: note: Assuming allocation function fails tofi-0.9.1/src/entry_backend/harfbuzz.c:99:39: note: Assignment 'cairo_glyphs=xmalloc(sizeof(cairo_glyph_t)*glyph_count)', assigned value is 0 tofi-0.9.1/src/entry_backend/harfbuzz.c:114:3: note: Null pointer dereference tofi-0.9.1/src/entry_backend/harfbuzz.c:702:4: warning: If memory allocation fails, then there is a possible null pointer dereference: buf [nullPointerOutOfMemory] tofi-0.9.1/src/entry_backend/harfbuzz.c:699:26: note: Assuming allocation function fails tofi-0.9.1/src/entry_backend/harfbuzz.c:699:26: note: Assignment 'buf=xcalloc(nchars+1,sizeof(*entry->input_utf32))', assigned value is 0 tofi-0.9.1/src/entry_backend/harfbuzz.c:702:4: note: Null pointer dereference tofi-0.9.1/src/entry_backend/harfbuzz.c:704:3: warning: If memory allocation fails, then there is a possible null pointer dereference: buf [nullPointerOutOfMemory] tofi-0.9.1/src/entry_backend/harfbuzz.c:699:26: note: Assuming allocation function fails tofi-0.9.1/src/entry_backend/harfbuzz.c:699:26: note: Assignment 'buf=xcalloc(nchars+1,sizeof(*entry->input_utf32))', assigned value is 0 tofi-0.9.1/src/entry_backend/harfbuzz.c:704:3: note: Null pointer dereference tofi-0.9.1/src/entry_backend/harfbuzz.c:847:6: warning: If memory allocation fails, then there is a possible null pointer dereference: match [nullPointerOutOfMemory] tofi-0.9.1/src/entry_backend/harfbuzz.c:840:21: note: Assuming allocation function fails tofi-0.9.1/src/entry_backend/harfbuzz.c:840:21: note: Assignment 'match=xstrdup(result)', assigned value is 0 tofi-0.9.1/src/entry_backend/harfbuzz.c:847:6: note: Null pointer dereference tofi-0.9.1/src/entry_backend/harfbuzz.c:86:78: style: Parameter 'font_extents' can be declared as pointer to const [constParameterPointer] tofi-0.9.1/src/entry_backend/harfbuzz.c:838:11: style: Variable 'match_pos' can be declared as pointer to const [constVariablePointer] tofi-0.9.1/src/entry_backend/pango.c:349:5: warning: If memory allocation fails, then there is a possible null pointer dereference: buf [nullPointerOutOfMemory] tofi-0.9.1/src/entry_backend/pango.c:346:22: note: Assuming allocation function fails tofi-0.9.1/src/entry_backend/pango.c:346:22: note: Assignment 'buf=xmalloc(1+nchars*char_size)', assigned value is 0 tofi-0.9.1/src/entry_backend/pango.c:349:5: note: Null pointer dereference tofi-0.9.1/src/entry_backend/pango.c:352:3: warning: If memory allocation fails, then there is a possible null pointer dereference: buf [nullPointerOutOfMemory] tofi-0.9.1/src/entry_backend/pango.c:346:22: note: Assuming allocation function fails tofi-0.9.1/src/entry_backend/pango.c:346:22: note: Assignment 'buf=xmalloc(1+nchars*char_size)', assigned value is 0 tofi-0.9.1/src/entry_backend/pango.c:352:3: note: Null pointer dereference tofi-0.9.1/src/entry_backend/pango.c:544:27: style: Variable 'entry->num_results_drawn' is reassigned a value before the old one has been used. [redundantAssignment] tofi-0.9.1/src/entry_backend/pango.c:432:31: note: entry->num_results_drawn is assigned tofi-0.9.1/src/entry_backend/pango.c:544:27: note: entry->num_results_drawn is overwritten tofi-0.9.1/src/entry_backend/pango.c:461:11: style: Variable 'match_pos' can be declared as pointer to const [constVariablePointer] tofi-0.9.1/src/fuzzy_match.c:36:8: style: Variable 'pattern' can be declared as pointer to const [constVariablePointer] tofi-0.9.1/src/fuzzy_match.c:38:9: style: Variable 'c' can be declared as pointer to const [constVariablePointer] tofi-0.9.1/src/fuzzy_match.c:61:8: style: Variable 'pattern' can be declared as pointer to const [constVariablePointer] tofi-0.9.1/src/history.c:73:2: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] tofi-0.9.1/src/history.c:130:26: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable O_WRONLY [valueFlowBailoutIncompleteVar] tofi-0.9.1/src/input.c:44:21: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable XKB_KEY_BackSpace [valueFlowBailoutIncompleteVar] tofi-0.9.1/src/input.c:272:2: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] tofi-0.9.1/src/history.c:100:3: error: Memory leak: buf [memleak] tofi-0.9.1/src/history.c:43:4: warning: If memory allocation fails, then there is a possible null pointer dereference: histfile_name [nullPointerOutOfMemory] tofi-0.9.1/src/history.c:41:26: note: Assuming allocation function fails tofi-0.9.1/src/history.c:41:26: note: Assignment 'histfile_name=xmalloc(len)', assigned value is 0 tofi-0.9.1/src/history.c:43:4: note: Null pointer dereference tofi-0.9.1/src/history.c:54:4: warning: If memory allocation fails, then there is a possible null pointer dereference: histfile_name [nullPointerOutOfMemory] tofi-0.9.1/src/history.c:52:26: note: Assuming allocation function fails tofi-0.9.1/src/history.c:52:26: note: Assignment 'histfile_name=xmalloc(len)', assigned value is 0 tofi-0.9.1/src/history.c:54:4: note: Null pointer dereference tofi-0.9.1/src/history.c:97:12: warning: If memory allocation fails, then there is a possible null pointer dereference: buf [nullPointerOutOfMemory] tofi-0.9.1/src/history.c:96:21: note: Assuming allocation function fails tofi-0.9.1/src/history.c:96:21: note: Assignment 'buf=xmalloc(len+1)', assigned value is 0 tofi-0.9.1/src/history.c:97:12: note: Null pointer dereference tofi-0.9.1/src/history.c:106:8: style: Variable 'tok' can be declared as pointer to const [constVariablePointer] tofi-0.9.1/src/lock.c:56:2: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] tofi-0.9.1/src/lock.c:71:2: error: Resource leak: fd [resourceLeak] tofi-0.9.1/src/lock.c:32:4: warning: If memory allocation fails, then there is a possible null pointer dereference: lock_name [nullPointerOutOfMemory] tofi-0.9.1/src/lock.c:30:22: note: Assuming allocation function fails tofi-0.9.1/src/lock.c:30:22: note: Assignment 'lock_name=xmalloc(len)', assigned value is 0 tofi-0.9.1/src/lock.c:32:4: note: Null pointer dereference tofi-0.9.1/src/lock.c:43:4: warning: If memory allocation fails, then there is a possible null pointer dereference: lock_name [nullPointerOutOfMemory] tofi-0.9.1/src/lock.c:41:22: note: Assuming allocation function fails tofi-0.9.1/src/lock.c:41:22: note: Assignment 'lock_name=xmalloc(len)', assigned value is 0 tofi-0.9.1/src/lock.c:43:4: note: Null pointer dereference tofi-0.9.1/src/log.c:38:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] tofi-0.9.1/src/log.c:47:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] tofi-0.9.1/src/log.c:59:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] tofi-0.9.1/src/log.c:91:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] tofi-0.9.1/src/log.c:101:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] tofi-0.9.1/src/log.c:109:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] tofi-0.9.1/src/log.c:57:2: style:inconclusive: Statements following 'return' will never be executed. [unreachableCode] tofi-0.9.1/src/log.c:118:2: style:inconclusive: Statements following 'return' will never be executed. [unreachableCode] tofi-0.9.1/src/main_compgen.c:11:33: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdout [valueFlowBailoutIncompleteVar] tofi-0.9.1/src/main.c:43:16: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable CLOCK_MONOTONIC [valueFlowBailoutIncompleteVar] tofi-0.9.1/src/main.c:53:28: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable BUFSIZ [valueFlowBailoutIncompleteVar] tofi-0.9.1/src/main.c:143:19: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable WL_KEYBOARD_KEYMAP_FORMAT_XKB_V1 [valueFlowBailoutIncompleteVar] tofi-0.9.1/src/main.c:206:15: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable WL_KEYBOARD_KEY_STATE_PRESSED [valueFlowBailoutIncompleteVar] tofi-0.9.1/src/main.c:379:38: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable WL_SEAT_CAPABILITY_KEYBOARD [valueFlowBailoutIncompleteVar] tofi-0.9.1/src/main.c:569:16: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable WL_OUTPUT_MODE_CURRENT [valueFlowBailoutIncompleteVar] tofi-0.9.1/src/main.c:638:49: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable name [valueFlowBailoutIncompleteVar] tofi-0.9.1/src/main.c:825:25: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdout [valueFlowBailoutIncompleteVar] tofi-0.9.1/src/main.c:939:2: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable opterr [valueFlowBailoutIncompleteVar] tofi-0.9.1/src/main.c:1072:2: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] tofi-0.9.1/src/main.c:1152:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable LC_ALL [valueFlowBailoutIncompleteVar] tofi-0.9.1/src/mkdirp.c:27:32: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] tofi-0.9.1/src/mkdirp.c:27:13: warning:inconclusive: If memory allocation fails, then there is a possible null pointer dereference: tmp [nullPointerOutOfMemory] tofi-0.9.1/src/mkdirp.c:22:21: note: Assuming allocation function fails tofi-0.9.1/src/mkdirp.c:22:21: note: Assignment 'tmp=xstrdup(path)', assigned value is 0 tofi-0.9.1/src/mkdirp.c:27:13: note: Null pointer dereference tofi-0.9.1/src/mkdirp.c:24:33: error: If memory allocation fails: pointer addition with NULL pointer. [nullPointerArithmeticOutOfMemory] tofi-0.9.1/src/mkdirp.c:22:21: note: Assuming allocation function fails tofi-0.9.1/src/mkdirp.c:22:21: note: Assignment 'tmp=xstrdup(path)', assigned value is 0 tofi-0.9.1/src/mkdirp.c:23:17: note: Assignment 'cursor=tmp', assigned value is 0 tofi-0.9.1/src/mkdirp.c:24:33: note: Null pointer addition tofi-0.9.1/src/shm.c:13:16: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable CLOCK_REALTIME [valueFlowBailoutIncompleteVar] tofi-0.9.1/src/shm.c:28:27: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable O_RDWR [valueFlowBailoutIncompleteVar] tofi-0.9.1/src/shm.c:58:22: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] tofi-0.9.1/src/string_vec.c:16:33: style: Variable 'str1' can be declared as pointer to const [constVariablePointer] tofi-0.9.1/src/string_vec.c:17:33: style: Variable 'str2' can be declared as pointer to const [constVariablePointer] tofi-0.9.1/src/string_vec.c:33:33: style: Variable 'str1' can be declared as pointer to const [constVariablePointer] tofi-0.9.1/src/string_vec.c:34:33: style: Variable 'str2' can be declared as pointer to const [constVariablePointer] tofi-0.9.1/src/string_vec.c:43:33: style: Variable 'str1' can be declared as pointer to const [constVariablePointer] tofi-0.9.1/src/string_vec.c:44:33: style: Variable 'str2' can be declared as pointer to const [constVariablePointer] tofi-0.9.1/src/string_vec.c:171:74: style: Parameter 'vec' can be declared as pointer to const [constParameterPointer] tofi-0.9.1/src/string_vec.c:176:86: style: Parameter 'vec' can be declared as pointer to const [constParameterPointer] tofi-0.9.1/src/main.c:169:2: error: Resource handle 'fd' freed twice. [doubleFree] tofi-0.9.1/src/main.c:159:3: note: Resource handle 'fd' freed twice. tofi-0.9.1/src/main.c:169:2: note: Resource handle 'fd' freed twice. tofi-0.9.1/src/main.c:676:2: error: Memory leak: el [memleak] tofi-0.9.1/src/main.c:168:9: warning:inconclusive: If memory allocation fails, then there is a possible null pointer dereference: map_shm [nullPointerOutOfMemory] tofi-0.9.1/src/main.c:145:22: note: Assuming allocation function fails tofi-0.9.1/src/main.c:145:22: note: Assignment 'map_shm=mmap(NULL,size,PROT_READ,MAP_PRIVATE,fd,0)', assigned value is 0 tofi-0.9.1/src/main.c:168:9: note: Null pointer dereference tofi-0.9.1/src/surface.c:31:4: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable PROT_READ [valueFlowBailoutIncompleteVar] tofi-0.9.1/src/main.c:659:4: warning: If memory allocation fails, then there is a possible null pointer dereference: el [nullPointerOutOfMemory] tofi-0.9.1/src/main.c:657:43: note: Assuming allocation function fails tofi-0.9.1/src/main.c:657:43: note: Assignment 'el=xmalloc(sizeof(*el))', assigned value is 0 tofi-0.9.1/src/main.c:659:4: note: Null pointer dereference tofi-0.9.1/src/main.c:665:3: warning: If memory allocation fails, then there is a possible null pointer dereference: el [nullPointerOutOfMemory] tofi-0.9.1/src/main.c:657:43: note: Assuming allocation function fails tofi-0.9.1/src/main.c:657:43: note: Assignment 'el=xmalloc(sizeof(*el))', assigned value is 0 tofi-0.9.1/src/main.c:665:3: note: Null pointer dereference tofi-0.9.1/src/main.c:671:5: warning: If memory allocation fails, then there is a possible null pointer dereference: el [nullPointerOutOfMemory] tofi-0.9.1/src/main.c:657:43: note: Assuming allocation function fails tofi-0.9.1/src/main.c:657:43: note: Assignment 'el=xmalloc(sizeof(*el))', assigned value is 0 tofi-0.9.1/src/main.c:671:5: note: Null pointer dereference tofi-0.9.1/src/main.c:1065:10: warning: If memory allocation fails, then there is a possible null pointer dereference: end_text [nullPointerOutOfMemory] tofi-0.9.1/src/main.c:1064:21: note: Assuming allocation function fails tofi-0.9.1/src/main.c:1064:21: note: Assignment 'end_text=xcalloc(end_text_length,sizeof(*entry->input_utf32))', assigned value is 0 tofi-0.9.1/src/main.c:1065:10: note: Null pointer dereference tofi-0.9.1/src/main.c:173:9: style: Parameter 'data' can be declared as pointer to const. However it seems that 'wl_keyboard_enter' is a callback function, if 'data' is declared with const you might also need to cast function pointer(s). [constParameterCallback] tofi-0.9.1/src/main.c:267:11: note: You might need to cast the function pointer here tofi-0.9.1/src/main.c:173:9: note: Parameter 'data' can be declared as pointer to const tofi-0.9.1/src/main.c:174:23: style: Parameter 'wl_keyboard' can be declared as pointer to const. However it seems that 'wl_keyboard_enter' is a callback function, if 'wl_keyboard' is declared with const you might also need to cast function pointer(s). [constParameterCallback] tofi-0.9.1/src/main.c:267:11: note: You might need to cast the function pointer here tofi-0.9.1/src/main.c:174:23: note: Parameter 'wl_keyboard' can be declared as pointer to const tofi-0.9.1/src/main.c:176:22: style: Parameter 'surface' can be declared as pointer to const. However it seems that 'wl_keyboard_enter' is a callback function, if 'surface' is declared with const you might also need to cast function pointer(s). [constParameterCallback] tofi-0.9.1/src/main.c:267:11: note: You might need to cast the function pointer here tofi-0.9.1/src/main.c:176:22: note: Parameter 'surface' can be declared as pointer to const tofi-0.9.1/src/main.c:177:20: style: Parameter 'keys' can be declared as pointer to const. However it seems that 'wl_keyboard_enter' is a callback function, if 'keys' is declared with const you might also need to cast function pointer(s). [constParameterCallback] tofi-0.9.1/src/main.c:267:11: note: You might need to cast the function pointer here tofi-0.9.1/src/main.c:177:20: note: Parameter 'keys' can be declared as pointer to const tofi-0.9.1/src/main.c:183:9: style: Parameter 'data' can be declared as pointer to const. However it seems that 'wl_keyboard_leave' is a callback function, if 'data' is declared with const you might also need to cast function pointer(s). [constParameterCallback] tofi-0.9.1/src/main.c:268:11: note: You might need to cast the function pointer here tofi-0.9.1/src/main.c:183:9: note: Parameter 'data' can be declared as pointer to const tofi-0.9.1/src/main.c:184:23: style: Parameter 'wl_keyboard' can be declared as pointer to const. However it seems that 'wl_keyboard_leave' is a callback function, if 'wl_keyboard' is declared with const you might also need to cast function pointer(s). [constParameterCallback] tofi-0.9.1/src/main.c:268:11: note: You might need to cast the function pointer here tofi-0.9.1/src/main.c:184:23: note: Parameter 'wl_keyboard' can be declared as pointer to const tofi-0.9.1/src/main.c:186:22: style: Parameter 'surface' can be declared as pointer to const. However it seems that 'wl_keyboard_leave' is a callback function, if 'surface' is declared with const you might also need to cast function pointer(s). [constParameterCallback] tofi-0.9.1/src/main.c:268:11: note: You might need to cast the function pointer here tofi-0.9.1/src/main.c:186:22: note: Parameter 'surface' can be declared as pointer to const tofi-0.9.1/src/main.c:290:9: style: Parameter 'data' can be declared as pointer to const. However it seems that 'wl_pointer_leave' is a callback function, if 'data' is declared with const you might also need to cast function pointer(s). [constParameterCallback] tofi-0.9.1/src/main.c:362:11: note: You might need to cast the function pointer here tofi-0.9.1/src/main.c:290:9: note: Parameter 'data' can be declared as pointer to const tofi-0.9.1/src/main.c:291:22: style: Parameter 'pointer' can be declared as pointer to const. However it seems that 'wl_pointer_leave' is a callback function, if 'pointer' is declared with const you might also need to cast function pointer(s). [constParameterCallback] tofi-0.9.1/src/main.c:362:11: note: You might need to cast the function pointer here tofi-0.9.1/src/main.c:291:22: note: Parameter 'pointer' can be declared as pointer to const tofi-0.9.1/src/main.c:293:22: style: Parameter 'surface' can be declared as pointer to const. However it seems that 'wl_pointer_leave' is a callback function, if 'surface' is declared with const you might also need to cast function pointer(s). [constParameterCallback] tofi-0.9.1/src/main.c:362:11: note: You might need to cast the function pointer here tofi-0.9.1/src/main.c:293:22: note: Parameter 'surface' can be declared as pointer to const tofi-0.9.1/src/main.c:299:9: style: Parameter 'data' can be declared as pointer to const. However it seems that 'wl_pointer_motion' is a callback function, if 'data' is declared with const you might also need to cast function pointer(s). [constParameterCallback] tofi-0.9.1/src/main.c:363:12: note: You might need to cast the function pointer here tofi-0.9.1/src/main.c:299:9: note: Parameter 'data' can be declared as pointer to const tofi-0.9.1/src/main.c:300:22: style: Parameter 'pointer' can be declared as pointer to const. However it seems that 'wl_pointer_motion' is a callback function, if 'pointer' is declared with const you might also need to cast function pointer(s). [constParameterCallback] tofi-0.9.1/src/main.c:363:12: note: You might need to cast the function pointer here tofi-0.9.1/src/main.c:300:22: note: Parameter 'pointer' can be declared as pointer to const tofi-0.9.1/src/main.c:309:9: style: Parameter 'data' can be declared as pointer to const. However it seems that 'wl_pointer_button' is a callback function, if 'data' is declared with const you might also need to cast function pointer(s). [constParameterCallback] tofi-0.9.1/src/main.c:364:12: note: You might need to cast the function pointer here tofi-0.9.1/src/main.c:309:9: note: Parameter 'data' can be declared as pointer to const tofi-0.9.1/src/main.c:310:22: style: Parameter 'pointer' can be declared as pointer to const. However it seems that 'wl_pointer_button' is a callback function, if 'pointer' is declared with const you might also need to cast function pointer(s). [constParameterCallback] tofi-0.9.1/src/main.c:364:12: note: You might need to cast the function pointer here tofi-0.9.1/src/main.c:310:22: note: Parameter 'pointer' can be declared as pointer to const tofi-0.9.1/src/main.c:320:9: style: Parameter 'data' can be declared as pointer to const. However it seems that 'wl_pointer_axis' is a callback function, if 'data' is declared with const you might also need to cast function pointer(s). [constParameterCallback] tofi-0.9.1/src/main.c:365:10: note: You might need to cast the function pointer here tofi-0.9.1/src/main.c:320:9: note: Parameter 'data' can be declared as pointer to const tofi-0.9.1/src/main.c:321:22: style: Parameter 'pointer' can be declared as pointer to const. However it seems that 'wl_pointer_axis' is a callback function, if 'pointer' is declared with const you might also need to cast function pointer(s). [constParameterCallback] tofi-0.9.1/src/main.c:365:10: note: You might need to cast the function pointer here tofi-0.9.1/src/main.c:321:22: note: Parameter 'pointer' can be declared as pointer to const tofi-0.9.1/src/main.c:329:36: style: Parameter 'data' can be declared as pointer to const. However it seems that 'wl_pointer_frame' is a callback function, if 'data' is declared with const you might also need to cast function pointer(s). [constParameterCallback] tofi-0.9.1/src/main.c:366:11: note: You might need to cast the function pointer here tofi-0.9.1/src/main.c:329:36: note: Parameter 'data' can be declared as pointer to const tofi-0.9.1/src/main.c:329:61: style: Parameter 'pointer' can be declared as pointer to const. However it seems that 'wl_pointer_frame' is a callback function, if 'pointer' is declared with const you might also need to cast function pointer(s). [constParameterCallback] tofi-0.9.1/src/main.c:366:11: note: You might need to cast the function pointer here tofi-0.9.1/src/main.c:329:61: note: Parameter 'pointer' can be declared as pointer to const tofi-0.9.1/src/main.c:335:9: style: Parameter 'data' can be declared as pointer to const. However it seems that 'wl_pointer_axis_source' is a callback function, if 'data' is declared with const you might also need to cast function pointer(s). [constParameterCallback] tofi-0.9.1/src/main.c:367:17: note: You might need to cast the function pointer here tofi-0.9.1/src/main.c:335:9: note: Parameter 'data' can be declared as pointer to const tofi-0.9.1/src/main.c:336:22: style: Parameter 'pointer' can be declared as pointer to const. However it seems that 'wl_pointer_axis_source' is a callback function, if 'pointer' is declared with const you might also need to cast function pointer(s). [constParameterCallback] tofi-0.9.1/src/main.c:367:17: note: You might need to cast the function pointer here tofi-0.9.1/src/main.c:336:22: note: Parameter 'pointer' can be declared as pointer to const tofi-0.9.1/src/main.c:343:9: style: Parameter 'data' can be declared as pointer to const. However it seems that 'wl_pointer_axis_stop' is a callback function, if 'data' is declared with const you might also need to cast function pointer(s). [constParameterCallback] tofi-0.9.1/src/main.c:368:15: note: You might need to cast the function pointer here tofi-0.9.1/src/main.c:343:9: note: Parameter 'data' can be declared as pointer to const tofi-0.9.1/src/main.c:344:22: style: Parameter 'pointer' can be declared as pointer to const. However it seems that 'wl_pointer_axis_stop' is a callback function, if 'pointer' is declared with const you might also need to cast function pointer(s). [constParameterCallback] tofi-0.9.1/src/main.c:368:15: note: You might need to cast the function pointer here tofi-0.9.1/src/main.c:344:22: note: Parameter 'pointer' can be declared as pointer to const tofi-0.9.1/src/main.c:352:9: style: Parameter 'data' can be declared as pointer to const [constParameterPointer] tofi-0.9.1/src/main.c:353:22: style: Parameter 'pointer' can be declared as pointer to const [constParameterPointer] tofi-0.9.1/src/main.c:409:32: style: Parameter 'data' can be declared as pointer to const. However it seems that 'wl_seat_name' is a callback function, if 'data' is declared with const you might also need to cast function pointer(s). [constParameterCallback] tofi-0.9.1/src/main.c:416:10: note: You might need to cast the function pointer here tofi-0.9.1/src/main.c:409:32: note: Parameter 'data' can be declared as pointer to const tofi-0.9.1/src/main.c:409:54: style: Parameter 'wl_seat' can be declared as pointer to const. However it seems that 'wl_seat_name' is a callback function, if 'wl_seat' is declared with const you might also need to cast function pointer(s). [constParameterCallback] tofi-0.9.1/src/main.c:416:10: note: You might need to cast the function pointer here tofi-0.9.1/src/main.c:409:54: note: Parameter 'wl_seat' can be declared as pointer to const tofi-0.9.1/src/main.c:437:9: style: Parameter 'data' can be declared as pointer to const. However it seems that 'wl_data_offer_source_actions' is a callback function, if 'data' is declared with const you might also need to cast function pointer(s). [constParameterCallback] tofi-0.9.1/src/main.c:454:20: note: You might need to cast the function pointer here tofi-0.9.1/src/main.c:437:9: note: Parameter 'data' can be declared as pointer to const tofi-0.9.1/src/main.c:438:25: style: Parameter 'wl_data_offer' can be declared as pointer to const. However it seems that 'wl_data_offer_source_actions' is a callback function, if 'wl_data_offer' is declared with const you might also need to cast function pointer(s). [constParameterCallback] tofi-0.9.1/src/main.c:454:20: note: You might need to cast the function pointer here tofi-0.9.1/src/main.c:438:25: note: Parameter 'wl_data_offer' can be declared as pointer to const tofi-0.9.1/src/main.c:445:9: style: Parameter 'data' can be declared as pointer to const [constParameterPointer] tofi-0.9.1/src/main.c:446:25: style: Parameter 'wl_data_offer' can be declared as pointer to const [constParameterPointer] tofi-0.9.1/src/main.c:493:9: style: Parameter 'data' can be declared as pointer to const. However it seems that 'wl_data_device_leave' is a callback function, if 'data' is declared with const you might also need to cast function pointer(s). [constParameterCallback] tofi-0.9.1/src/main.c:530:11: note: You might need to cast the function pointer here tofi-0.9.1/src/main.c:493:9: note: Parameter 'data' can be declared as pointer to const tofi-0.9.1/src/main.c:494:26: style: Parameter 'wl_data_device' can be declared as pointer to const. However it seems that 'wl_data_device_leave' is a callback function, if 'wl_data_device' is declared with const you might also need to cast function pointer(s). [constParameterCallback] tofi-0.9.1/src/main.c:530:11: note: You might need to cast the function pointer here tofi-0.9.1/src/main.c:494:26: note: Parameter 'wl_data_device' can be declared as pointer to const tofi-0.9.1/src/main.c:500:9: style: Parameter 'data' can be declared as pointer to const. However it seems that 'wl_data_device_motion' is a callback function, if 'data' is declared with const you might also need to cast function pointer(s). [constParameterCallback] tofi-0.9.1/src/main.c:531:12: note: You might need to cast the function pointer here tofi-0.9.1/src/main.c:500:9: note: Parameter 'data' can be declared as pointer to const tofi-0.9.1/src/main.c:501:26: style: Parameter 'wl_data_device' can be declared as pointer to const. However it seems that 'wl_data_device_motion' is a callback function, if 'wl_data_device' is declared with const you might also need to cast function pointer(s). [constParameterCallback] tofi-0.9.1/src/main.c:531:12: note: You might need to cast the function pointer here tofi-0.9.1/src/main.c:501:26: note: Parameter 'wl_data_device' can be declared as pointer to const tofi-0.9.1/src/main.c:510:9: style: Parameter 'data' can be declared as pointer to const. However it seems that 'wl_data_device_drop' is a callback function, if 'data' is declared with const you might also need to cast function pointer(s). [constParameterCallback] tofi-0.9.1/src/main.c:532:10: note: You might need to cast the function pointer here tofi-0.9.1/src/main.c:510:9: note: Parameter 'data' can be declared as pointer to const tofi-0.9.1/src/main.c:511:26: style: Parameter 'wl_data_device' can be declared as pointer to const. However it seems that 'wl_data_device_drop' is a callback function, if 'wl_data_device' is declared with const you might also need to cast function pointer(s). [constParameterCallback] tofi-0.9.1/src/main.c:532:10: note: You might need to cast the function pointer here tofi-0.9.1/src/main.c:511:26: note: Parameter 'wl_data_device' can be declared as pointer to const tofi-0.9.1/src/main.c:519:25: style: Parameter 'wl_data_offer' can be declared as pointer to const [constParameterPointer] tofi-0.9.1/src/main.c:538:21: style: Parameter 'wl_output' can be declared as pointer to const. However it seems that 'output_geometry' is a callback function, if 'wl_output' is declared with const you might also need to cast function pointer(s). [constParameterCallback] tofi-0.9.1/src/main.c:619:14: note: You might need to cast the function pointer here tofi-0.9.1/src/main.c:538:21: note: Parameter 'wl_output' can be declared as pointer to const tofi-0.9.1/src/main.c:559:21: style: Parameter 'wl_output' can be declared as pointer to const. However it seems that 'output_mode' is a callback function, if 'wl_output' is declared with const you might also need to cast function pointer(s). [constParameterCallback] tofi-0.9.1/src/main.c:620:10: note: You might need to cast the function pointer here tofi-0.9.1/src/main.c:559:21: note: Parameter 'wl_output' can be declared as pointer to const tofi-0.9.1/src/main.c:579:21: style: Parameter 'wl_output' can be declared as pointer to const. However it seems that 'output_scale' is a callback function, if 'wl_output' is declared with const you might also need to cast function pointer(s). [constParameterCallback] tofi-0.9.1/src/main.c:622:11: note: You might need to cast the function pointer here tofi-0.9.1/src/main.c:579:21: note: Parameter 'wl_output' can be declared as pointer to const tofi-0.9.1/src/main.c:593:21: style: Parameter 'wl_output' can be declared as pointer to const. However it seems that 'output_name' is a callback function, if 'wl_output' is declared with const you might also need to cast function pointer(s). [constParameterCallback] tofi-0.9.1/src/main.c:624:10: note: You might need to cast the function pointer here tofi-0.9.1/src/main.c:593:21: note: Parameter 'wl_output' can be declared as pointer to const tofi-0.9.1/src/main.c:606:9: style: Parameter 'data' can be declared as pointer to const. However it seems that 'output_description' is a callback function, if 'data' is declared with const you might also need to cast function pointer(s). [constParameterCallback] tofi-0.9.1/src/main.c:625:17: note: You might need to cast the function pointer here tofi-0.9.1/src/main.c:606:9: note: Parameter 'data' can be declared as pointer to const tofi-0.9.1/src/main.c:607:21: style: Parameter 'wl_output' can be declared as pointer to const. However it seems that 'output_description' is a callback function, if 'wl_output' is declared with const you might also need to cast function pointer(s). [constParameterCallback] tofi-0.9.1/src/main.c:625:17: note: You might need to cast the function pointer here tofi-0.9.1/src/main.c:607:21: note: Parameter 'wl_output' can be declared as pointer to const tofi-0.9.1/src/main.c:613:31: style: Parameter 'data' can be declared as pointer to const. However it seems that 'output_done' is a callback function, if 'data' is declared with const you might also need to cast function pointer(s). [constParameterCallback] tofi-0.9.1/src/main.c:621:10: note: You might need to cast the function pointer here tofi-0.9.1/src/main.c:613:31: note: Parameter 'data' can be declared as pointer to const tofi-0.9.1/src/main.c:613:55: style: Parameter 'wl_output' can be declared as pointer to const. However it seems that 'output_done' is a callback function, if 'wl_output' is declared with const you might also need to cast function pointer(s). [constParameterCallback] tofi-0.9.1/src/main.c:621:10: note: You might need to cast the function pointer here tofi-0.9.1/src/main.c:613:55: note: Parameter 'wl_output' can be declared as pointer to const tofi-0.9.1/src/main.c:721:9: style: Parameter 'data' can be declared as pointer to const. However it seems that 'registry_global_remove' is a callback function, if 'data' is declared with const you might also need to cast function pointer(s). [constParameterCallback] tofi-0.9.1/src/main.c:730:19: note: You might need to cast the function pointer here tofi-0.9.1/src/main.c:721:9: note: Parameter 'data' can be declared as pointer to const tofi-0.9.1/src/main.c:722:23: style: Parameter 'wl_registry' can be declared as pointer to const. However it seems that 'registry_global_remove' is a callback function, if 'wl_registry' is declared with const you might also need to cast function pointer(s). [constParameterCallback] tofi-0.9.1/src/main.c:730:19: note: You might need to cast the function pointer here tofi-0.9.1/src/main.c:722:23: note: Parameter 'wl_registry' can be declared as pointer to const tofi-0.9.1/src/main.c:734:9: style: Parameter 'data' can be declared as pointer to const. However it seems that 'surface_enter' is a callback function, if 'data' is declared with const you might also need to cast function pointer(s). [constParameterCallback] tofi-0.9.1/src/main.c:750:11: note: You might need to cast the function pointer here tofi-0.9.1/src/main.c:734:9: note: Parameter 'data' can be declared as pointer to const tofi-0.9.1/src/main.c:735:22: style: Parameter 'wl_surface' can be declared as pointer to const. However it seems that 'surface_enter' is a callback function, if 'wl_surface' is declared with const you might also need to cast function pointer(s). [constParameterCallback] tofi-0.9.1/src/main.c:750:11: note: You might need to cast the function pointer here tofi-0.9.1/src/main.c:735:22: note: Parameter 'wl_surface' can be declared as pointer to const tofi-0.9.1/src/main.c:736:21: style: Parameter 'wl_output' can be declared as pointer to const. However it seems that 'surface_enter' is a callback function, if 'wl_output' is declared with const you might also need to cast function pointer(s). [constParameterCallback] tofi-0.9.1/src/main.c:750:11: note: You might need to cast the function pointer here tofi-0.9.1/src/main.c:736:21: note: Parameter 'wl_output' can be declared as pointer to const tofi-0.9.1/src/main.c:742:9: style: Parameter 'data' can be declared as pointer to const [constParameterPointer] tofi-0.9.1/src/main.c:743:22: style: Parameter 'wl_surface' can be declared as pointer to const [constParameterPointer] tofi-0.9.1/src/main.c:744:21: style: Parameter 'wl_output' can be declared as pointer to const [constParameterPointer] tofi-0.9.1/src/main.c:771:9: style: Parameter 'data' can be declared as pointer to const [constParameterPointer] tofi-0.9.1/src/main.c:772:33: style: Parameter 'zwlr_layer_surface' can be declared as pointer to const [constParameterPointer] tofi-0.9.1/src/main.c:797:21: style: Parameter 'wl_output' can be declared as pointer to const. However it seems that 'dummy_surface_enter' is a callback function, if 'wl_output' is declared with const you might also need to cast function pointer(s). [constParameterCallback] tofi-0.9.1/src/main.c:818:11: note: You might need to cast the function pointer here tofi-0.9.1/src/main.c:797:21: note: Parameter 'wl_output' can be declared as pointer to const tofi-0.9.1/src/main.c:810:9: style: Parameter 'data' can be declared as pointer to const [constParameterPointer] tofi-0.9.1/src/main.c:811:22: style: Parameter 'wl_surface' can be declared as pointer to const [constParameterPointer] tofi-0.9.1/src/main.c:812:21: style: Parameter 'wl_output' can be declared as pointer to const [constParameterPointer] tofi-0.9.1/src/main.c:1005:8: style: Variable 'res' can be declared as pointer to const [constVariablePointer] tofi-0.9.1/src/main.c:1034:9: style: Variable 'path' can be declared as pointer to const [constVariablePointer] tofi-0.9.1/src/main.c:551:11: error: Uninitialized variable: el->wl_output [uninitvar] tofi-0.9.1/src/main.c:568:11: error: Uninitialized variable: el->wl_output [uninitvar] tofi-0.9.1/src/main.c:585:11: error: Uninitialized variable: el->wl_output [uninitvar] tofi-0.9.1/src/main.c:599:11: error: Uninitialized variable: el->wl_output [uninitvar] tofi-0.9.1/src/main.c:802:11: error: Uninitialized variable: el->wl_output [uninitvar] tofi-0.9.1/src/main.c:1311:46: error: Uninitialized variable: el->name [uninitvar] tofi-0.9.1/src/main.c:1388:45: error: Uninitialized variable: el->name [uninitvar] tofi-0.9.1/src/unicode.c:126:33: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable G_NORMALIZE_DEFAULT [valueFlowBailoutIncompleteVar] tofi-0.9.1/src/unicode.c:131:33: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable G_NORMALIZE_DEFAULT_COMPOSE [valueFlowBailoutIncompleteVar] tofi-0.9.1/src/unicode.c:118:2: error: Mismatching allocation and deallocation: h [mismatchAllocDealloc] tofi-0.9.1/src/unicode.c:106:12: note: Mismatching allocation and deallocation: h tofi-0.9.1/src/unicode.c:118:2: note: Mismatching allocation and deallocation: h tofi-0.9.1/src/unicode.c:119:2: error: Mismatching allocation and deallocation: n [mismatchAllocDealloc] tofi-0.9.1/src/unicode.c:107:12: note: Mismatching allocation and deallocation: n tofi-0.9.1/src/unicode.c:119:2: note: Mismatching allocation and deallocation: n tofi-0.9.1/src/unicode.c:109:8: style: Variable 'cmp' can be declared as pointer to const [constVariablePointer] tofi-0.9.1/test/config.c:26:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable LC_ALL [valueFlowBailoutIncompleteVar] tofi-0.9.1/test/config.c:24:26: style: Parameter 'argv' can be declared as const array [constParameter] tofi-0.9.1/test/utf8.c:47:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable LC_ALL [valueFlowBailoutIncompleteVar] tofi-0.9.1/test/utf8.c:45:26: style: Parameter 'argv' can be declared as const array [constParameter] tofi-0.9.1/src/config.c:133:28: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] tofi-0.9.1/src/config.c:847:9: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable ZWLR_LAYER_SURFACE_V1_ANCHOR_TOP [valueFlowBailoutIncompleteVar] tofi-0.9.1/src/config.c:935:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable ZWLR_LAYER_SURFACE_V1_ANCHOR_TOP [valueFlowBailoutIncompleteVar] tofi-0.9.1/src/config.c:1000:2: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] tofi-0.9.1/src/config.c:1019:2: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] tofi-0.9.1/src/config.c:1038:2: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] tofi-0.9.1/src/config.c:1090:6: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable top [valueFlowBailoutIncompleteVar] tofi-0.9.1/src/config.c:742:42: style: Expression is always false because 'else if' condition matches previous condition at line 335. [multiCondition] tofi-0.9.1/src/config.c:298:10: warning: If memory allocation fails, then there is a possible null pointer dereference: buf [nullPointerOutOfMemory] tofi-0.9.1/src/config.c:297:21: note: Assuming allocation function fails tofi-0.9.1/src/config.c:297:21: note: Assignment 'buf=xcalloc(len+1,1)', assigned value is 0 tofi-0.9.1/src/config.c:298:10: note: Null pointer dereference tofi-0.9.1/src/config.c:299:2: warning: If memory allocation fails, then there is a possible null pointer dereference: buf [nullPointerOutOfMemory] tofi-0.9.1/src/config.c:297:21: note: Assuming allocation function fails tofi-0.9.1/src/config.c:297:21: note: Assignment 'buf=xcalloc(len+1,1)', assigned value is 0 tofi-0.9.1/src/config.c:299:2: note: Null pointer dereference tofi-0.9.1/src/config.c:888:11: warning: If memory allocation fails, then there is a possible null pointer dereference: name [nullPointerOutOfMemory] tofi-0.9.1/src/config.c:887:22: note: Assuming allocation function fails tofi-0.9.1/src/config.c:887:22: note: Assignment 'name=xcalloc(len,sizeof(*name))', assigned value is 0 tofi-0.9.1/src/config.c:888:11: note: Null pointer dereference tofi-0.9.1/src/config.c:184:8: style: Variable 'copy_pos' can be declared as pointer to const [constVariablePointer] tofi-0.9.1/src/config.c:228:9: style: Variable 'option' can be declared as pointer to const [constVariablePointer] tofi-0.9.1/src/config.c:242:9: style: Variable 'value' can be declared as pointer to const [constVariablePointer] tofi-0.9.1/src/config.c:312:10: style: Variable 'dir' can be declared as pointer to const [constVariablePointer] tofi-0.9.1/src/config.c:875:8: style: Variable 'base_dir' can be declared as pointer to const [constVariablePointer] tofi-0.9.1/src/config.c:876:8: style: Variable 'ext' can be declared as pointer to const [constVariablePointer] tofi-0.9.1/src/config.c:1067:8: style: Variable 'val' can be declared as pointer to const [constVariablePointer] diff: 2.17.0 tofi-0.9.1/src/mkdirp.c:24:33: error: If memory allocation fail: pointer addition with NULL pointer. [nullPointerArithmeticOutOfMemory] tofi-0.9.1/src/mkdirp.c:22:21: note: Assuming allocation function fails tofi-0.9.1/src/mkdirp.c:22:21: note: Assignment 'tmp=xstrdup(path)', assigned value is 0 tofi-0.9.1/src/mkdirp.c:23:17: note: Assignment 'cursor=tmp', assigned value is 0 tofi-0.9.1/src/mkdirp.c:24:33: note: Null pointer addition head tofi-0.9.1/src/mkdirp.c:24:33: error: If memory allocation fails: pointer addition with NULL pointer. [nullPointerArithmeticOutOfMemory] tofi-0.9.1/src/mkdirp.c:22:21: note: Assuming allocation function fails tofi-0.9.1/src/mkdirp.c:22:21: note: Assignment 'tmp=xstrdup(path)', assigned value is 0 tofi-0.9.1/src/mkdirp.c:23:17: note: Assignment 'cursor=tmp', assigned value is 0 tofi-0.9.1/src/mkdirp.c:24:33: note: Null pointer addition DONE