Task #77590 - fixed.err

back to task #77590
download
Error: GCC_ANALYZER_WARNING (CWE-835):
SDL3-3.2.20/src/video/SDL_surface.c:3003:12: warning[-Wanalyzer-infinite-loop]: infinite loop
SDL3-3.2.20/src/video/SDL_surface.c:2863:6: enter_function: entry to ‘SDL_WriteSurfacePixel_REAL’
# 3001|       SDL_InvalidateMap(&surface->map);
# 3002|   
# 3003|->     while (surface->locked > 0) {
# 3004|           SDL_UnlockSurface(surface);
# 3005|       }

Error: GCC_ANALYZER_WARNING (CWE-775):
SDL3-3.2.20/src/video/wayland/SDL_waylanddatamanager.c:376:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefd[0]’
SDL3-3.2.20/src/video/wayland/SDL_waylanddatamanager.c:363:8: branch_false: following ‘false’ branch (when ‘offer’ is non-NULL)...
SDL3-3.2.20/src/video/wayland/SDL_waylanddatamanager.c:367:5: branch_false: ...to here
SDL3-3.2.20/src/video/wayland/SDL_waylanddatamanager.c:368:8: branch_false: following ‘false’ branch (when ‘data_device’ is non-NULL)...
SDL3-3.2.20/src/video/wayland/SDL_waylanddatamanager.c:370:16: branch_false: ...to here
SDL3-3.2.20/src/video/wayland/SDL_waylanddatamanager.c:370:15: branch_false: following ‘false’ branch...
SDL3-3.2.20/src/video/wayland/SDL_waylanddatamanager.c:373:56: branch_false: ...to here
SDL3-3.2.20/src/video/wayland/SDL_waylanddatamanager.c:376:9: danger: ‘pipefd[0]’ leaks here
#  374|   
#  375|           // TODO: Needs pump and flush?
#  376|->         WAYLAND_wl_display_flush(data_device->video_data->display);
#  377|   
#  378|           close(pipefd[1]);

Error: GCC_ANALYZER_WARNING (CWE-775):
SDL3-3.2.20/src/video/wayland/SDL_waylanddatamanager.c:412:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefd[0]’
SDL3-3.2.20/src/video/wayland/SDL_waylanddatamanager.c:399:8: branch_false: following ‘false’ branch (when ‘offer’ is non-NULL)...
SDL3-3.2.20/src/video/wayland/SDL_waylanddatamanager.c:403:5: branch_false: ...to here
SDL3-3.2.20/src/video/wayland/SDL_waylanddatamanager.c:404:8: branch_false: following ‘false’ branch (when ‘primary_selection_device’ is non-NULL)...
SDL3-3.2.20/src/video/wayland/SDL_waylanddatamanager.c:406:16: branch_false: ...to here
SDL3-3.2.20/src/video/wayland/SDL_waylanddatamanager.c:406:15: branch_false: following ‘false’ branch...
SDL3-3.2.20/src/video/wayland/SDL_waylanddatamanager.c:409:73: branch_false: ...to here
SDL3-3.2.20/src/video/wayland/SDL_waylanddatamanager.c:412:9: danger: ‘pipefd[0]’ leaks here
#  410|   
#  411|           // TODO: Needs pump and flush?
#  412|->         WAYLAND_wl_display_flush(primary_selection_device->video_data->display);
#  413|   
#  414|           close(pipefd[1]);

Error: CPPCHECK_WARNING (CWE-457):
SDL3-3.2.20/src/video/wayland/SDL_waylandevents.c:156: error[uninitvar]: Uninitialized variable: tp->surface
#  154|   
#  155|       wl_list_for_each (tp, &touch_points, link) {
#  156|->         if (tp->surface == surface) {
#  157|               return true;
#  158|           }

Error: CPPCHECK_WARNING (CWE-457):
SDL3-3.2.20/src/video/wayland/SDL_waylandevents.c:1220: error[uninitvar]: Uninitialized variable: tp->surface
# 1218|           bool removed = false;
# 1219|   
# 1220|->         if (tp->surface) {
# 1221|               SDL_WindowData *window_data = (SDL_WindowData *)wl_surface_get_user_data(tp->surface);
# 1222|   

Error: CPPCHECK_WARNING (CWE-457):
SDL3-3.2.20/src/video/wayland/SDL_waylandevents.c:3204: error[uninitvar]: Uninitialized variables: tp.id, tp.fx, tp.fy, tp.surface, tp.link
# 3202|           wl_list_for_each_safe (tp, tmp, &touch_points, link) {
# 3203|               WAYLAND_wl_list_remove(&tp->link);
# 3204|->             SDL_free(tp);
# 3205|           }
# 3206|       }

Error: CPPCHECK_WARNING (CWE-457):
SDL3-3.2.20/src/video/wayland/SDL_waylandmouse.c:618: error[uninitvar]: Uninitialized variables: c.scale, c.node
#  616|           wl_list_for_each_safe(c, temp, &d->cursor_data.custom.scaled_cursor_cache, node) {
#  617|               Wayland_ReleaseSHMBuffer(&c->shmBuffer);
#  618|->             SDL_free(c);
#  619|           }
#  620|   

Error: GCC_ANALYZER_WARNING (CWE-775):
SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:201:21: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’
SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:854:6: enter_function: entry to ‘X11_ShowMessageBox’
SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:863:8: branch_false: following ‘false’ branch...
SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:867:11: branch_false: ...to here
SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:868:8: branch_false: following ‘false’ branch (when ‘pid != -1’)...
SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:872:15: branch_false: ...to here
SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:872:15: branch_true: following ‘true’ branch (when ‘pid == 0’)...
SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:874:9: branch_true: ...to here
SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:875:18: call_function: calling ‘X11_ShowMessageBoxImpl’ from ‘X11_ShowMessageBox’
#  199|       data->pbuttonid = pbuttonid;
#  200|   
#  201|->     data->display = X11_XOpenDisplay(NULL);
#  202|       if (!data->display) {
#  203|           return SDL_SetError("Couldn't open X11 display");

Error: GCC_ANALYZER_WARNING (CWE-775):
SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:212:30: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’
SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:854:6: enter_function: entry to ‘X11_ShowMessageBox’
SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:863:8: branch_false: following ‘false’ branch...
SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:867:11: branch_false: ...to here
SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:868:8: branch_false: following ‘false’ branch (when ‘pid != -1’)...
SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:872:15: branch_false: ...to here
SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:872:15: branch_true: following ‘true’ branch (when ‘pid == 0’)...
SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:874:9: branch_true: ...to here
SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:875:18: call_function: calling ‘X11_ShowMessageBoxImpl’ from ‘X11_ShowMessageBox’
#  210|           int i_font;
#  211|           for (i_font = 0; g_MessageBoxFont[i_font]; ++i_font) {
#  212|->             data->font_set = X11_XCreateFontSet(data->display, g_MessageBoxFont[i_font],
#  213|                                                   &missing, &num_missing, NULL);
#  214|               if (missing) {

Error: GCC_ANALYZER_WARNING (CWE-775):
SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:813:10: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’
SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:854:6: enter_function: entry to ‘X11_ShowMessageBox’
SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:863:8: branch_false: following ‘false’ branch...
SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:867:11: branch_false: ...to here
SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:868:8: branch_false: following ‘false’ branch (when ‘pid != -1’)...
SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:872:15: branch_false: ...to here
SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:872:15: branch_true: following ‘true’ branch (when ‘pid == 0’)...
SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:874:9: branch_true: ...to here
SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:875:18: call_function: calling ‘X11_ShowMessageBoxImpl’ from ‘X11_ShowMessageBox’
#  811|       SDL_zero(data);
#  812|   
#  813|->     if (!SDL_X11_LoadSymbols()) {
#  814|           return false;
#  815|       }

Error: GCC_ANALYZER_WARNING (CWE-775):
SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:829:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’
SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:854:6: enter_function: entry to ‘X11_ShowMessageBox’
SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:863:8: branch_false: following ‘false’ branch...
SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:867:11: branch_false: ...to here
SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:868:8: branch_false: following ‘false’ branch (when ‘pid != -1’)...
SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:872:15: branch_false: ...to here
SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:872:15: branch_true: following ‘true’ branch (when ‘pid == 0’)...
SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:874:9: branch_true: ...to here
SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:875:18: call_function: calling ‘X11_ShowMessageBoxImpl’ from ‘X11_ShowMessageBox’
#  827|   
#  828|       // This code could get called from multiple threads maybe?
#  829|->     X11_XInitThreads();
#  830|   
#  831|       // Initialize the return buttonID value to -1 (for error or dialogbox closed).

Error: GCC_ANALYZER_WARNING (CWE-775):
SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:876:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’
SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:863:8: branch_false: following ‘false’ branch...
SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:867:11: branch_false: ...to here
SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:868:8: branch_false: following ‘false’ branch (when ‘pid != -1’)...
SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:872:15: branch_false: ...to here
SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:872:15: branch_true: following ‘true’ branch (when ‘pid == 0’)...
SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:874:9: branch_true: ...to here
SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:876:13: danger: ‘fds[1]’ leaks here
#  874|           close(fds[0]);
#  875|           result = X11_ShowMessageBoxImpl(messageboxdata, buttonID);
#  876|->         if (write(fds[1], &result, sizeof(result)) != sizeof(result)) {
#  877|               exitcode = 1;
#  878|           } else if (write(fds[1], buttonID, sizeof(*buttonID)) != sizeof(*buttonID)) {

Error: GCC_ANALYZER_WARNING (CWE-775):
SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:885:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’
SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:863:8: branch_false: following ‘false’ branch...
SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:867:11: branch_false: ...to here
SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:868:8: branch_false: following ‘false’ branch (when ‘pid != -1’)...
SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:872:15: branch_false: ...to here
SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:872:15: branch_false: following ‘false’ branch (when ‘pid != 0’)...
SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:885:9: branch_false: ...to here
SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:885:9: danger: ‘fds[1]’ leaks here
#  883|       } else {             // we're the parent
#  884|           pid_t rc;
#  885|->         close(fds[1]);
#  886|           do {
#  887|               rc = waitpid(pid, &status, 0);

Error: GCC_ANALYZER_WARNING (CWE-775):
SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:885:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[status]’
SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:863:8: branch_false: following ‘false’ branch...
SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:867:11: branch_false: ...to here
SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:868:8: branch_false: following ‘false’ branch (when ‘pid != -1’)...
SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:872:15: branch_false: ...to here
SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:872:15: branch_false: following ‘false’ branch (when ‘pid != 0’)...
SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:885:9: branch_false: ...to here
SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:885:9: danger: ‘fds[status]’ leaks here
#  883|       } else {             // we're the parent
#  884|           pid_t rc;
#  885|->         close(fds[1]);
#  886|           do {
#  887|               rc = waitpid(pid, &status, 0);

Error: GCC_ANALYZER_WARNING (CWE-775):
SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:887:18: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[0]’
SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:863:8: branch_false: following ‘false’ branch...
SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:867:11: branch_false: ...to here
SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:868:8: branch_false: following ‘false’ branch (when ‘pid != -1’)...
SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:872:15: branch_false: ...to here
SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:872:15: branch_false: following ‘false’ branch (when ‘pid != 0’)...
SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:885:9: branch_false: ...to here
SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:888:18: branch_true: following ‘true’ branch...
SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:887:18: danger: ‘fds[0]’ leaks here
#  885|           close(fds[1]);
#  886|           do {
#  887|->             rc = waitpid(pid, &status, 0);
#  888|           } while ((rc == -1) && (errno == EINTR));
#  889|   

Error: GCC_ANALYZER_WARNING (CWE-775):
SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:887:18: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[status]’
SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:863:8: branch_false: following ‘false’ branch...
SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:867:11: branch_false: ...to here
SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:868:8: branch_false: following ‘false’ branch (when ‘pid != -1’)...
SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:872:15: branch_false: ...to here
SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:872:15: branch_false: following ‘false’ branch (when ‘pid != 0’)...
SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:885:9: branch_false: ...to here
SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:887:18: danger: ‘fds[status]’ leaks here
#  885|           close(fds[1]);
#  886|           do {
#  887|->             rc = waitpid(pid, &status, 0);
#  888|           } while ((rc == -1) && (errno == EINTR));
#  889|   

Error: GCC_ANALYZER_WARNING (CWE-775):
SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:899:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[0]’
SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:863:8: branch_false: following ‘false’ branch...
SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:867:11: branch_false: ...to here
SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:868:8: branch_false: following ‘false’ branch (when ‘pid != -1’)...
SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:872:15: branch_false: ...to here
SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:872:15: branch_false: following ‘false’ branch (when ‘pid != 0’)...
SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:885:9: branch_false: ...to here
SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:899:9: danger: ‘fds[0]’ leaks here
#  897|               *buttonID = 0;
#  898|           }
#  899|->         close(fds[0]);
#  900|   
#  901|           return result;