2025-03-16 03:17 ftp://ftp.de.debian.org/debian/pool/main/g/gnome-user-share/gnome-user-share_47.2.orig.tar.xz cppcheck-options: --library=posix --library=gnu --library=bsd --library=gtk --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 -j10 platform: Linux-6.8.12-8-pve-x86_64-with-glibc2.39 python: 3.12.3 client-version: 1.3.66 compiler: g++ (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0 cppcheck: head 2.17.0 head-info: 08ae2de (2025-03-15 11:19:35 +0100) count: 20 20 elapsed-time: 0.2 0.2 head-timing-info: old-timing-info: head results: gnome-user-share-47.2/src/user_share-common.c:50:29: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable G_USER_DIRECTORY_PUBLIC_SHARE [valueFlowBailoutIncompleteVar] gnome-user-share-47.2/src/user_share-webdav.c:87:19: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SIG_IGN [valueFlowBailoutIncompleteVar] gnome-user-share-47.2/src/user_share-webdav.c:108:27: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable GETTEXT_PACKAGE [valueFlowBailoutIncompleteVar] gnome-user-share-47.2/src/user_share-webdav.c:47:31: style: Parameter 'settings' can be declared as pointer to const. However it seems that 'setttings_changed' is a callback function, if 'settings' is declared with const you might also need to cast function pointer(s). [constParameterCallback] gnome-user-share-47.2/src/user_share-webdav.c:97:2: note: You might need to cast the function pointer here gnome-user-share-47.2/src/user_share-webdav.c:47:31: note: Parameter 'settings' can be declared as pointer to const gnome-user-share-47.2/src/user_share-webdav.c:48:13: style: Parameter 'path' can be declared as pointer to const. However it seems that 'setttings_changed' is a callback function, if 'path' is declared with const you might also need to cast function pointer(s). [constParameterCallback] gnome-user-share-47.2/src/user_share-webdav.c:97:2: note: You might need to cast the function pointer here gnome-user-share-47.2/src/user_share-webdav.c:48:13: note: Parameter 'path' can be declared as pointer to const gnome-user-share-47.2/src/user_share-webdav.c:49:15: style: Parameter 'data' can be declared as pointer to const. However it seems that 'setttings_changed' is a callback function, if 'data' is declared with const you might also need to cast function pointer(s). [constParameterCallback] gnome-user-share-47.2/src/user_share-webdav.c:97:2: note: You might need to cast the function pointer here gnome-user-share-47.2/src/user_share-webdav.c:49:15: note: Parameter 'data' can be declared as pointer to const gnome-user-share-47.2/src/user_share-webdav.c:64:48: style: Parameter 'connection' can be declared as pointer to const. However it seems that 'user_share_webdav_bus_closed' is a callback function, if 'connection' is declared with const you might also need to cast function pointer(s). [constParameterCallback] gnome-user-share-47.2/src/user_share-webdav.c:93:2: note: You might need to cast the function pointer here gnome-user-share-47.2/src/user_share-webdav.c:64:48: note: Parameter 'connection' can be declared as pointer to const gnome-user-share-47.2/src/user_share-webdav.c:66:18: style: Parameter 'error' can be declared as pointer to const. However it seems that 'user_share_webdav_bus_closed' is a callback function, if 'error' is declared with const you might also need to cast function pointer(s). [constParameterCallback] gnome-user-share-47.2/src/user_share-webdav.c:93:2: note: You might need to cast the function pointer here gnome-user-share-47.2/src/user_share-webdav.c:66:18: note: Parameter 'error' can be declared as pointer to const gnome-user-share-47.2/src/user_share-webdav.c:67:24: style: Parameter 'app' can be declared as pointer to const. However it seems that 'user_share_webdav_bus_closed' is a callback function, if 'app' is declared with const you might also need to cast function pointer(s). [constParameterCallback] gnome-user-share-47.2/src/user_share-webdav.c:93:2: note: You might need to cast the function pointer here gnome-user-share-47.2/src/user_share-webdav.c:67:24: note: Parameter 'app' can be declared as pointer to const gnome-user-share-47.2/src/http.c:65:25: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable INADDR_ANY [valueFlowBailoutIncompleteVar] gnome-user-share-47.2/src/http.c:189:46: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable G_FILE_TEST_IS_EXECUTABLE [valueFlowBailoutIncompleteVar] gnome-user-share-47.2/src/http.c:215:54: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable G_FILE_TEST_IS_EXECUTABLE [valueFlowBailoutIncompleteVar] gnome-user-share-47.2/src/http.c:260:28: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable HTTPD_CONFIG_TEMPLATE [valueFlowBailoutIncompleteVar] gnome-user-share-47.2/src/http.c:291:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] gnome-user-share-47.2/src/http.c:410:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] gnome-user-share-47.2/src/http.c:89:2: error: Resource leak: sock [resourceLeak] gnome-user-share-47.2/src/http.c:357:3: error: Memory leak: pid_filename [memleak] gnome-user-share-47.2/src/http.c:132:14: warning: If memory allocation fails, then there is a possible null pointer dereference: name [nullPointerOutOfMemory] gnome-user-share-47.2/src/http.c:121:27: note: Assuming allocation function fails gnome-user-share-47.2/src/http.c:121:27: note: Assignment 'name=g_strdup_printf(((char*)g_dgettext(NULL,"%s's public files")),g_get_user_name())', assigned value is 0 gnome-user-share-47.2/src/http.c:132:14: note: Null pointer dereference gnome-user-share-47.2/src/http.c:332:10: warning: If memory allocation fails, then there is a possible null pointer dereference: pid_filename [nullPointerOutOfMemory] gnome-user-share-47.2/src/http.c:329:34: note: Assuming allocation function fails gnome-user-share-47.2/src/http.c:329:34: note: Assignment 'pid_filename=g_build_filename(g_get_user_config_dir(),"user-share","pid",NULL)', assigned value is 0 gnome-user-share-47.2/src/http.c:332:10: note: Null pointer dereference gnome-user-share-47.2/src/http.c:153:29: style: Parameter 'user_data' can be declared as pointer to const. However it seems that 'httpd_child_setup' is a callback function, if 'user_data' is declared with const you might also need to cast function pointer(s). [constParameterCallback] gnome-user-share-47.2/src/http.c:337:8: note: You might need to cast the function pointer here gnome-user-share-47.2/src/http.c:153:29: note: Parameter 'user_data' can be declared as pointer to const diff: DONE