Task #92140 - fixed.err
back to task #92140download
Error: COMPILER_WARNING (CWE-704):
tmux-3.5a/compat/getopt.c: scope_hint: In function ‘BSDgetopt’
tmux-3.5a/compat/getopt.c:76:19: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 76 | !(oli = strchr(ostr, BSDoptopt))) {
# | ^
# 74| } /* option letter okay? */
# 75| if ((BSDoptopt = (int)*place++) == (int)':' ||
# 76|-> !(oli = strchr(ostr, BSDoptopt))) {
# 77| /*
# 78| * if the user didn't specify '-' as an option,
Error: COMPILER_WARNING (CWE-704):
tmux-3.5a/compat/getopt.c:76:19: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 74| } /* option letter okay? */
# 75| if ((BSDoptopt = (int)*place++) == (int)':' ||
# 76|-> !(oli = strchr(ostr, BSDoptopt))) {
# 77| /*
# 78| * if the user didn't specify '-' as an option,
Error: GCC_ANALYZER_WARNING (CWE-401):
tmux-3.5a/compat/imsg.c:80:13: warning[-Wanalyzer-malloc-leak]: leak of ‘ifd’
tmux-3.5a/compat/imsg.c:76:20: acquire_memory: allocated here
tmux-3.5a/compat/imsg.c:76:12: branch_false: following ‘false’ branch (when ‘ifd’ is non-NULL)...
tmux-3.5a/compat/imsg.c:76:12: branch_false: ...to here
tmux-3.5a/compat/imsg.c:80:13: throw: if ‘getdtablecount’ throws an exception...
tmux-3.5a/compat/imsg.c:80:13: danger: ‘ifd’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
# 78|
# 79| again:
# 80|-> if (getdtablecount() + imsg_fd_overhead +
# 81| (int)((CMSG_SPACE(sizeof(int))-CMSG_SPACE(0))/sizeof(int))
# 82| >= getdtablesize()) {
Error: GCC_ANALYZER_WARNING (CWE-401):
tmux-3.5a/compat/imsg.c:88:18: warning[-Wanalyzer-malloc-leak]: leak of ‘ifd’
tmux-3.5a/compat/imsg.c:76:20: acquire_memory: allocated here
tmux-3.5a/compat/imsg.c:76:12: branch_false: following ‘false’ branch (when ‘ifd’ is non-NULL)...
tmux-3.5a/compat/imsg.c:76:12: branch_false: ...to here
tmux-3.5a/compat/imsg.c:80:12: branch_false: following ‘false’ branch...
tmux-3.5a/compat/imsg.c:88:18: branch_false: ...to here
tmux-3.5a/compat/imsg.c:88:18: throw: if ‘recvmsg’ throws an exception...
tmux-3.5a/compat/imsg.c:88:18: danger: ‘ifd’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
# 86| }
# 87|
# 88|-> if ((n = recvmsg(imsgbuf->fd, &msg, 0)) == -1) {
# 89| if (errno == EINTR)
# 90| goto again;
Error: GCC_ANALYZER_WARNING (CWE-476):
tmux-3.5a/grid.c:1286:16: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘from’
tmux-3.5a/grid.c:1378:1: enter_function: entry to ‘grid_reflow’
tmux-3.5a/grid.c:1389:18: call_function: calling ‘grid_create’ from ‘grid_reflow’
tmux-3.5a/grid.c:1389:18: return_function: returning to ‘grid_reflow’ from ‘grid_create’
tmux-3.5a/grid.c:1394:22: branch_true: following ‘true’ branch...
tmux-3.5a/grid.c:1395:23: branch_true: ...to here
tmux-3.5a/grid.c:1424:20: branch_false: following ‘false’ branch (when ‘width != sx’)...
tmux-3.5a/grid.c:1433:20: branch_false: ...to here
tmux-3.5a/grid.c:1433:20: branch_false: following ‘false’ branch (when ‘width <= sx’)...
tmux-3.5a/grid.c:1442:21: branch_false: ...to here
tmux-3.5a/grid.c:1442:20: branch_true: following ‘true’ branch...
tmux-3.5a/grid.c:1443:25: branch_true: ...to here
tmux-3.5a/grid.c:1443:25: call_function: calling ‘grid_reflow_join’ from ‘grid_reflow’
# 1284| * remove the wrap flag from this line.
# 1285| */
# 1286|-> left = from->cellused - want;
# 1287| if (left != 0) {
# 1288| grid_move_cells(gd, 0, want, yy + lines, left, 8);
Error: COMPILER_WARNING (CWE-457):
tmux-3.5a/image-sixel.c: scope_hint: In function ‘sixel_print’
tmux-3.5a/image-sixel.c:549:25: warning[-Wmaybe-uninitialized]: ‘data’ may be used uninitialized
# 549 | sixel_print_repeat(&buf, &len, &used, count, data);
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tmux-3.5a/image-sixel.c:480:59: note: ‘data’ was declared here
# 480 | char *buf, tmp[64], *contains, data, last = 0;
# | ^~~~
# 547| count++;
# 548| }
# 549|-> sixel_print_repeat(&buf, &len, &used, count, data);
# 550| sixel_print_add(&buf, &len, &used, "$", 1);
# 551| }
Error: COMPILER_WARNING (CWE-681):
tmux-3.5a/input.c: scope_hint: In function ‘input_dcs_dispatch’
tmux-3.5a/input.c:2336:34: warning[-Wpointer-sign]: pointer targets in passing argument 1 of ‘sixel_parse’ differ in signedness
# 2336 | si = sixel_parse(buf, len, w->xpixel, w->ypixel);
# | ^~~
# | |
# | u_char * {aka unsigned char *}
tmux-3.5a/input.c:29: included_from: Included from here.
tmux-3.5a/tmux.h:3485:33: note: expected ‘const char *’ but argument is of type ‘u_char *’ {aka ‘unsigned char *’}
# 3485 | struct sixel_image *sixel_parse(const char *, size_t, u_int, u_int);
# | ^~~~~~~~~~~~
# 2334| w = wp->window;
# 2335| if (buf[0] == 'q') {
# 2336|-> si = sixel_parse(buf, len, w->xpixel, w->ypixel);
# 2337| if (si != NULL)
# 2338| screen_write_sixelimage(sctx, si, ictx->cell.cell.bg);
Error: COMPILER_WARNING (CWE-681):
tmux-3.5a/input.c: scope_hint: In function ‘input_exit_apc’
tmux-3.5a/input.c:2472:43: warning[-Wpointer-sign]: pointer targets in passing argument 2 of ‘screen_set_title’ differ in signedness
# 2472 | if (screen_set_title(sctx->s, ictx->input_buf) && wp != NULL) {
# | ~~~~^~~~~~~~~~~
# | |
# | u_char * {aka unsigned char *}
tmux-3.5a/tmux.h:3061:44: note: expected ‘const char *’ but argument is of type ‘u_char *’ {aka ‘unsigned char *’}
# 3061 | int screen_set_title(struct screen *, const char *);
# | ^~~~~~~~~~~~
# 2470| log_debug("%s: \"%s\"", __func__, ictx->input_buf);
# 2471|
# 2472|-> if (screen_set_title(sctx->s, ictx->input_buf) && wp != NULL) {
# 2473| notify_pane("pane-title-changed", wp);
# 2474| server_redraw_window_borders(wp->window);
Error: CPPCHECK_WARNING (CWE-457):
tmux-3.5a/screen-write.c:1860: warning[uninitvar]: Uninitialized variable: gc.data.width
# 1858| &grid_default_cell);
# 1859| }
# 1860|-> if (gc.data.width > 1) {
# 1861| grid_view_set_cell(s->grid, xx, s->cy,
# 1862| &grid_default_cell);
Error: COMPILER_WARNING (CWE-704):
tmux-3.5a/utf8.c: scope_hint: In function ‘utf8_in_table’
tmux-3.5a/utf8.c:309:15: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 309 | found = bsearch(&find, table, count, sizeof *table, utf8_table_cmp);
# | ^
# 307| wchar_t *found;
# 308|
# 309|-> found = bsearch(&find, table, count, sizeof *table, utf8_table_cmp);
# 310| return (found != NULL);
# 311| }
Error: COMPILER_WARNING (CWE-704):
tmux-3.5a/utf8.c:309:15: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 307| wchar_t *found;
# 308|
# 309|-> found = bsearch(&find, table, count, sizeof *table, utf8_table_cmp);
# 310| return (found != NULL);
# 311| }