tmux-3.4-1.fc41

List of Defects

Error: CPPCHECK_WARNING: [#def1]
tmux-3.4-build/tmux-3.4/alerts.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def2]
tmux-3.4-build/tmux-3.4/arguments.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def3]
tmux-3.4-build/tmux-3.4/arguments.c:744:3: warning[core.CallAndMessage]: 3rd function call argument is an uninitialized value
#  742|   	cmdlist = args_make_commands(state, 0, NULL, &error);
#  743|   	if (cmdlist == NULL) {
#  744|-> 		cmdq_error(item, "%s", error);
#  745|   		free(error);
#  746|   	}

Error: GCC_ANALYZER_WARNING (CWE-457): [#def4]
tmux-3.4-build/tmux-3.4/arguments.c: scope_hint: In function ‘args_make_commands_now’
tmux-3.4-build/tmux-3.4/arguments.c:744:17: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘error’
#  742|   	cmdlist = args_make_commands(state, 0, NULL, &error);
#  743|   	if (cmdlist == NULL) {
#  744|-> 		cmdq_error(item, "%s", error);
#  745|   		free(error);
#  746|   	}

Error: CPPCHECK_WARNING: [#def5]
tmux-3.4-build/tmux-3.4/cfg.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def6]
tmux-3.4-build/tmux-3.4/client.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING (CWE-252): [#def7]
tmux-3.4-build/tmux-3.4/client.c: scope_hint: In function ‘client_dispatch_attached’
tmux-3.4-build/tmux-3.4/client.c:814:17: warning[-Wunused-result]: ignoring return value of ‘system’ declared with attribute ‘warn_unused_result’
#  814 |                 system(data);
#      |                 ^~~~~~~~~~~~
#  812|   			fatalx("bad MSG_LOCK string");
#  813|   
#  814|-> 		system(data);
#  815|   		proc_send(client_peer, MSG_UNLOCK, -1, NULL, 0);
#  816|   		break;

Error: CPPCHECK_WARNING: [#def8]
tmux-3.4-build/tmux-3.4/cmd-attach-session.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def9]
tmux-3.4-build/tmux-3.4/cmd-bind-key.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def10]
tmux-3.4-build/tmux-3.4/cmd-break-pane.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def11]
tmux-3.4-build/tmux-3.4/cmd-capture-pane.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING (CWE-681): [#def12]
tmux-3.4-build/tmux-3.4/cmd-capture-pane.c: scope_hint: In function ‘cmd_capture_pane_pending’
tmux-3.4-build/tmux-3.4/cmd-capture-pane.c:87:14: warning[-Wpointer-sign]: pointer targets in assignment from ‘unsigned char *’ to ‘char *’ differ in signedness
#   87 |         line = EVBUFFER_DATA(pending);
#      |              ^
#   85|   		return (xstrdup(""));
#   86|   
#   87|-> 	line = EVBUFFER_DATA(pending);
#   88|   	linelen = EVBUFFER_LENGTH(pending);
#   89|   

Error: CPPCHECK_WARNING: [#def13]
tmux-3.4-build/tmux-3.4/cmd-command-prompt.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def14]
tmux-3.4-build/tmux-3.4/cmd-confirm-before.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def15]
tmux-3.4-build/tmux-3.4/cmd-detach-client.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def16]
tmux-3.4-build/tmux-3.4/cmd-display-menu.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def17]
tmux-3.4-build/tmux-3.4/cmd-display-message.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def18]
tmux-3.4-build/tmux-3.4/cmd-display-panes.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def19]
tmux-3.4-build/tmux-3.4/cmd-find-window.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def20]
tmux-3.4-build/tmux-3.4/cmd-find.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING (CWE-562): [#def21]
tmux-3.4-build/tmux-3.4/cmd-find.c:979: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
#  977|   	} else if (cmd_find_from_client(&current, cmdq_get_client(item),
#  978|   	    flags) == 0) {
#  979|-> 		fs->current = &current;
#  980|   		log_debug("%s: current is from client", __func__);
#  981|   	} else {

Error: CPPCHECK_WARNING: [#def22]
tmux-3.4-build/tmux-3.4/cmd-if-shell.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def23]
tmux-3.4-build/tmux-3.4/cmd-join-pane.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def24]
tmux-3.4-build/tmux-3.4/cmd-kill-window.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def25]
tmux-3.4-build/tmux-3.4/cmd-list-clients.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def26]
tmux-3.4-build/tmux-3.4/cmd-list-keys.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def27]
tmux-3.4-build/tmux-3.4/cmd-load-buffer.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def28]
tmux-3.4-build/tmux-3.4/cmd-move-window.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def29]
tmux-3.4-build/tmux-3.4/cmd-new-session.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def30]
tmux-3.4-build/tmux-3.4/cmd-new-window.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def31]
tmux-3.4-build/tmux-3.4/cmd-parse.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def32]
tmux-3.4-build/tmux-3.4/cmd-parse.c:1509:13: warning[unix.Malloc]: Attempt to free released memory
# 1507|       newvs = (YYSTYPE *)realloc(yyvs, newsize * sizeof *newvs);
# 1508|       if (newvs == NULL)
# 1509|->         goto bail;
# 1510|       yyvs = newvs;
# 1511|       yyvsp = newvs + sslen;

Error: CLANG_WARNING: [#def33]
tmux-3.4-build/tmux-3.4/cmd-parse.c:1511:13: warning[unix.Malloc]: Attempt to free released memory
# 1509|           goto bail;
# 1510|       yyvs = newvs;
# 1511|->     yyvsp = newvs + sslen;
# 1512|       yystacksize = newsize;
# 1513|       yysslim = yyss + newsize - 1;

Error: CLANG_WARNING: [#def34]
tmux-3.4-build/tmux-3.4/cmd-parse.c:1544:12: warning[unix.Malloc]: Use of memory allocated with size zero
# 1542|       }
# 1543|   #endif /* YYDEBUG */
# 1544|-> 
# 1545|       yynerrs = 0;
# 1546|       yyerrflag = 0;

Error: CLANG_WARNING: [#def35]
tmux-3.4-build/tmux-3.4/cmd-parse.c:1574:18: warning[unix.Malloc]: Use of memory allocated with size zero
# 1572|       {
# 1573|   #if YYDEBUG
# 1574|->         if (yydebug)
# 1575|               printf("%sdebug: state %d, shifting to state %d\n",
# 1576|                       YYPREFIX, yystate, yytable[yyn]);

Error: CLANG_WARNING: [#def36]
tmux-3.4-build/tmux-3.4/cmd-parse.c:1615:26: warning[unix.Malloc]: Use of memory allocated with size zero
# 1613|               {
# 1614|   #if YYDEBUG
# 1615|->                 if (yydebug)
# 1616|                       printf("%sdebug: state %d, error recovery shifting\
# 1617|    to state %d\n", YYPREFIX, *yyssp, yytable[yyn]);

Error: CLANG_WARNING: [#def37]
tmux-3.4-build/tmux-3.4/cmd-parse.c:2210:14: warning[unix.Malloc]: Use of memory allocated with size zero
# 2208|           yystate = yydgoto[yym];
# 2209|   #if YYDEBUG
# 2210|->     if (yydebug)
# 2211|           printf("%sdebug: after reduction, shifting from state %d \
# 2212|   to state %d\n", YYPREFIX, *yyssp, yystate);

Error: CLANG_WARNING: [#def38]
tmux-3.4-build/tmux-3.4/cmd-parse.y:787:2: warning[unix.Malloc]: Use of memory after it is freed
#  785|   	cmd_parse_free_argument(first);
#  786|   
#  787|-> 	TAILQ_FOREACH_SAFE(arg, &cmd->arguments, entry, arg1) {
#  788|   		TAILQ_REMOVE(&cmd->arguments, arg, entry);
#  789|   		TAILQ_INSERT_TAIL(&last->arguments, arg, entry);

Error: GCC_ANALYZER_WARNING (CWE-457): [#def39]
tmux-3.4-build/tmux-3.4/cmd-parse.y: scope_hint: In function ‘yylex_token_escape’
tmux-3.4-build/tmux-3.4/cmd-parse.y:1500:16: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘tmp’
tmux-3.4-build/tmux-3.4/cmd-parse.y:23: included_from: Included from here.
# 1498|   		return (0);
# 1499|   	}
# 1500|-> 	mlen = wctomb(m, tmp);
# 1501|   	if (mlen <= 0 || mlen > (int)sizeof m) {
# 1502|   		yyerror("invalid \\%c argument", type);

Error: CPPCHECK_WARNING: [#def40]
tmux-3.4-build/tmux-3.4/cmd-paste-buffer.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def41]
tmux-3.4-build/tmux-3.4/cmd-pipe-pane.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-775): [#def42]
tmux-3.4-build/tmux-3.4/cmd-pipe-pane.c: scope_hint: In function ‘cmd_pipe_pane_exec’
tmux-3.4-build/tmux-3.4/cmd-pipe-pane.c:141:28: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dup2(pipe_fd[1], 0)’
#  139|   		null_fd = open(_PATH_DEVNULL, O_WRONLY);
#  140|   		if (out) {
#  141|-> 			if (dup2(pipe_fd[1], STDIN_FILENO) == -1)
#  142|   				_exit(1);
#  143|   		} else {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def43]
tmux-3.4-build/tmux-3.4/cmd-pipe-pane.c:141:29: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/null", 1)’
#  139|   		null_fd = open(_PATH_DEVNULL, O_WRONLY);
#  140|   		if (out) {
#  141|-> 			if (dup2(pipe_fd[1], STDIN_FILENO) == -1)
#  142|   				_exit(1);
#  143|   		} else {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def44]
tmux-3.4-build/tmux-3.4/cmd-pipe-pane.c:144:28: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/null", 1)’
#  142|   				_exit(1);
#  143|   		} else {
#  144|-> 			if (dup2(null_fd, STDIN_FILENO) == -1)
#  145|   				_exit(1);
#  146|   		}

Error: GCC_ANALYZER_WARNING: [#def45]
tmux-3.4-build/tmux-3.4/cmd-pipe-pane.c:144:29: warning[-Wanalyzer-fd-use-without-check]: ‘dup2’ on possibly invalid file descriptor ‘open("/dev/null", 1)’
#  142|   				_exit(1);
#  143|   		} else {
#  144|-> 			if (dup2(null_fd, STDIN_FILENO) == -1)
#  145|   				_exit(1);
#  146|   		}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def46]
tmux-3.4-build/tmux-3.4/cmd-pipe-pane.c:148:28: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dup2(pipe_fd[1], 1)’
#  146|   		}
#  147|   		if (in) {
#  148|-> 			if (dup2(pipe_fd[1], STDOUT_FILENO) == -1)
#  149|   				_exit(1);
#  150|   			if (pipe_fd[1] != STDOUT_FILENO)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def47]
tmux-3.4-build/tmux-3.4/cmd-pipe-pane.c:148:29: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/null", 1)’
#  146|   		}
#  147|   		if (in) {
#  148|-> 			if (dup2(pipe_fd[1], STDOUT_FILENO) == -1)
#  149|   				_exit(1);
#  150|   			if (pipe_fd[1] != STDOUT_FILENO)

Error: GCC_ANALYZER_WARNING: [#def48]
tmux-3.4-build/tmux-3.4/cmd-pipe-pane.c:153:29: warning[-Wanalyzer-fd-use-without-check]: ‘dup2’ on possibly invalid file descriptor ‘open("/dev/null", 1)’
#  151|   				close(pipe_fd[1]);
#  152|   		} else {
#  153|-> 			if (dup2(null_fd, STDOUT_FILENO) == -1)
#  154|   				_exit(1);
#  155|   		}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def49]
tmux-3.4-build/tmux-3.4/cmd-pipe-pane.c:156:20: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/null", 1)’
#  154|   				_exit(1);
#  155|   		}
#  156|-> 		if (dup2(null_fd, STDERR_FILENO) == -1)
#  157|   			_exit(1);
#  158|   		closefrom(STDERR_FILENO + 1);

Error: GCC_ANALYZER_WARNING: [#def50]
tmux-3.4-build/tmux-3.4/cmd-pipe-pane.c:156:21: warning[-Wanalyzer-fd-use-without-check]: ‘dup2’ on possibly invalid file descriptor ‘open("/dev/null", 1)’
#  154|   				_exit(1);
#  155|   		}
#  156|-> 		if (dup2(null_fd, STDERR_FILENO) == -1)
#  157|   			_exit(1);
#  158|   		closefrom(STDERR_FILENO + 1);

Error: CPPCHECK_WARNING: [#def51]
tmux-3.4-build/tmux-3.4/cmd-queue.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def52]
tmux-3.4-build/tmux-3.4/cmd-queue.c:462:2: warning[unix.Malloc]: Use of memory after it is freed
#  460|   	cmdq_free_state(item->state);
#  461|   
#  462|-> 	TAILQ_REMOVE(&item->queue->list, item, entry);
#  463|   
#  464|   	free(item->name);

Error: CLANG_WARNING: [#def53]
tmux-3.4-build/tmux-3.4/cmd-queue.c:745:7: warning[unix.Malloc]: Use of memory after it is freed
#  743|   			break;
#  744|   		log_debug("%s %s: %s (%d), flags %x", __func__, name,
#  745|-> 		    item->name, item->type, item->flags);
#  746|   
#  747|   		/*

Error: CPPCHECK_WARNING: [#def54]
tmux-3.4-build/tmux-3.4/cmd-refresh-client.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def55]
tmux-3.4-build/tmux-3.4/cmd-resize-pane.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def56]
tmux-3.4-build/tmux-3.4/cmd-resize-window.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def57]
tmux-3.4-build/tmux-3.4/cmd-rotate-window.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-476): [#def58]
tmux-3.4-build/tmux-3.4/cmd-rotate-window.c: scope_hint: In function ‘cmd_rotate_window_exec’
tmux-3.4-build/tmux-3.4/cmd-rotate-window.c:74:33: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘wp’
tmux-3.4-build/tmux-3.4/compat.h:142: included_from: Included from here.
tmux-3.4-build/tmux-3.4/tmux.h:35: included_from: Included from here.
tmux-3.4-build/tmux-3.4/cmd-rotate-window.c:21: included_from: Included from here.
tmux-3.4-build/tmux-3.4/cmd-rotate-window.c:58:22: note: in expansion of macro ‘TAILQ_LAST’
#   72|   			window_pane_resize(wp, wp2->sx, wp2->sy);
#   73|   		}
#   74|-> 		wp->layout_cell = lc;
#   75|   		if (wp->layout_cell != NULL)
#   76|   			wp->layout_cell->wp = wp;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def59]
tmux-3.4-build/tmux-3.4/cmd-rotate-window.c:99:33: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘wp’
tmux-3.4-build/tmux-3.4/cmd-rotate-window.c:85:17: note: in expansion of macro ‘TAILQ_INSERT_TAIL’
tmux-3.4-build/tmux-3.4/cmd-rotate-window.c:90:17: note: in expansion of macro ‘TAILQ_FOREACH_REVERSE’
#   97|   			window_pane_resize(wp, wp2->sx, wp2->sy);
#   98|   		}
#   99|-> 		wp->layout_cell = lc;
#  100|   		if (wp->layout_cell != NULL)
#  101|   			wp->layout_cell->wp = wp;

Error: CPPCHECK_WARNING: [#def60]
tmux-3.4-build/tmux-3.4/cmd-run-shell.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING (CWE-457): [#def61]
tmux-3.4-build/tmux-3.4/cmd-run-shell.c: scope_hint: In function ‘cmd_run_shell_exec’
tmux-3.4-build/tmux-3.4/cmd-run-shell.c:163:33: warning[-Wmaybe-uninitialized]: ‘d’ may be used uninitialized
#  163 |                 tv.tv_usec = (d - (double)tv.tv_sec) * 1000000U;
#      |                              ~~~^~~~~~~~~~~~~~~~~~~~
tmux-3.4-build/tmux-3.4/cmd-run-shell.c:112:42: note: ‘d’ was declared here
#  112 |         double                           d;
#      |                                          ^
#  161|   		timerclear(&tv);
#  162|   		tv.tv_sec = (time_t)d;
#  163|-> 		tv.tv_usec = (d - (double)tv.tv_sec) * 1000000U;
#  164|   		evtimer_add(&cdata->timer, &tv);
#  165|   	} else

Error: CPPCHECK_WARNING: [#def62]
tmux-3.4-build/tmux-3.4/cmd-select-pane.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def63]
tmux-3.4-build/tmux-3.4/cmd-select-window.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def64]
tmux-3.4-build/tmux-3.4/cmd-send-keys.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def65]
tmux-3.4-build/tmux-3.4/cmd-server-access.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def66]
tmux-3.4-build/tmux-3.4/cmd-set-environment.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def67]
tmux-3.4-build/tmux-3.4/cmd-show-options.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def68]
tmux-3.4-build/tmux-3.4/cmd-source-file.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def69]
tmux-3.4-build/tmux-3.4/cmd-split-window.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def70]
tmux-3.4-build/tmux-3.4/cmd-swap-pane.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def71]
tmux-3.4-build/tmux-3.4/cmd-swap-window.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def72]
tmux-3.4-build/tmux-3.4/cmd-switch-client.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def73]
tmux-3.4-build/tmux-3.4/cmd-wait-for.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def74]
tmux-3.4-build/tmux-3.4/cmd.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def75]
tmux-3.4-build/tmux-3.4/colour.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def76]
tmux-3.4-build/tmux-3.4/compat/getopt.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING (CWE-681): [#def77]
tmux-3.4-build/tmux-3.4/compat/getpeereid.c: scope_hint: In function ‘getpeereid’
tmux-3.4-build/tmux-3.4/compat/getpeereid.c:36:57: warning[-Wpointer-sign]: pointer targets in passing argument 5 of ‘getsockopt’ differ in signedness
#   36 |         if (getsockopt(s, SOL_SOCKET, SO_PEERCRED, &uc, &len) == -1)
#      |                                                         ^~~~
#      |                                                         |
#      |                                                         int *
tmux-3.4-build/tmux-3.4/compat/getpeereid.c:18: included_from: Included from here.
/usr/include/sys/socket.h:257:46: note: expected ‘socklen_t * restrict’ {aka ‘unsigned int * restrict’} but argument is of type ‘int *’
#  257 |                        socklen_t *__restrict __optlen) __THROW;
#      |                        ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
#   34|   	int		len = sizeof uc;
#   35|   
#   36|-> 	if (getsockopt(s, SOL_SOCKET, SO_PEERCRED, &uc, &len) == -1)
#   37|   		return (-1);
#   38|   	*uid = uc.uid;

Error: CPPCHECK_WARNING: [#def78]
tmux-3.4-build/tmux-3.4/compat/imsg-buffer.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def79]
tmux-3.4-build/tmux-3.4/compat/imsg-buffer.c:616:3: warning[unix.Malloc]: Use of memory after it is freed
#  614|   
#  615|   	while ((buf = TAILQ_FIRST(&msgbuf->bufs)) != NULL)
#  616|-> 		ibuf_dequeue(msgbuf, buf);
#  617|   }
#  618|   

Error: CPPCHECK_WARNING: [#def80]
tmux-3.4-build/tmux-3.4/compat/imsg.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def81]
tmux-3.4-build/tmux-3.4/compat/imsg.c:424:7: warning[unix.Malloc]: Use of memory after it is freed
#  422|   		return (-1);
#  423|   
#  424|-> 	fd = ifd->fd;
#  425|   	TAILQ_REMOVE(&imsgbuf->fds, ifd, entry);
#  426|   	free(ifd);

Error: CPPCHECK_WARNING: [#def82]
tmux-3.4-build/tmux-3.4/compat/recallocarray.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def83]
tmux-3.4-build/tmux-3.4/compat/vis.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING: [#def84]
tmux-3.4-build/tmux-3.4/compat/vis.c: scope_hint: In function ‘stravis’
tmux-3.4-build/tmux-3.4/compat/vis.c:222:23: warning[-Wuse-after-free]: pointer ‘buf_15’ may be used after ‘realloc’
#  222 |                 *outp = buf;
#      |                 ~~~~~~^~~~~
tmux-3.4-build/tmux-3.4/compat/vis.c:220:17: note: call to ‘realloc’ here
#  220 |         *outp = realloc(buf, len + 1);
#      |                 ^~~~~~~~~~~~~~~~~~~~~
#  220|   	*outp = realloc(buf, len + 1);
#  221|   	if (*outp == NULL) {
#  222|-> 		*outp = buf;
#  223|   		errno = serrno;
#  224|   	}

Error: CPPCHECK_WARNING: [#def85]
tmux-3.4-build/tmux-3.4/control-notify.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def86]
tmux-3.4-build/tmux-3.4/control.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def87]
tmux-3.4-build/tmux-3.4/environ.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING (CWE-252): [#def88]
tmux-3.4-build/tmux-3.4/environ.c: scope_hint: In function ‘environ_log’
tmux-3.4-build/tmux-3.4/environ.c:234:9: warning[-Wunused-result]: ignoring return value of ‘vasprintf’ declared with attribute ‘warn_unused_result’
#  234 |         vasprintf(&prefix, fmt, ap);
#      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~
#  232|   
#  233|   	va_start(ap, fmt);
#  234|-> 	vasprintf(&prefix, fmt, ap);
#  235|   	va_end(ap);
#  236|   

Error: CPPCHECK_WARNING: [#def89]
tmux-3.4-build/tmux-3.4/file.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def90]
tmux-3.4-build/tmux-3.4/format-draw.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def91]
tmux-3.4-build/tmux-3.4/format-draw.c:81:2: warning[unix.Malloc]: Use of memory after it is freed
#   79|   		return;
#   80|   
#   81|-> 	TAILQ_FOREACH_SAFE(fr, frs, entry, fr1) {
#   82|   		if (fr->s != s)
#   83|   			continue;

Error: CPPCHECK_WARNING: [#def92]
tmux-3.4-build/tmux-3.4/format.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def93]
tmux-3.4-build/tmux-3.4/format.c:4771:13: warning[core.CallAndMessage]: 1st function call argument is an uninitialized value
# 4769|   
# 4770|   	/* Expand the buffer and copy in the value. */
# 4771|-> 	valuelen = strlen(value);
# 4772|   	while (*len - *off < valuelen + 1) {
# 4773|   		*buf = xreallocarray(*buf, 2, *len);

Error: CPPCHECK_WARNING: [#def94]
tmux-3.4-build/tmux-3.4/grid.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def95]
tmux-3.4-build/tmux-3.4/grid.c:1073:27: warning[core.NullDereference]: Dereference of null pointer (loaded from variable 'lastgc')
# 1071|   
# 1072|   		if (flags & GRID_STRING_WITH_SEQUENCES) {
# 1073|-> 			grid_string_cells_code(*lastgc, &gc, code, sizeof code,
# 1074|   			    flags, s, &has_link);
# 1075|   			codelen = strlen(code);

Error: COMPILER_WARNING (CWE-681): [#def96]
tmux-3.4-build/tmux-3.4/grid.c: scope_hint: In function ‘grid_string_cells’
tmux-3.4-build/tmux-3.4/grid.c:1080:22: warning[-Wpointer-sign]: pointer targets in assignment from ‘u_char *’ {aka ‘unsigned char *’} to ‘const char *’ differ in signedness
# 1080 |                 data = gc.data.data;
#      |                      ^
# 1078|   			codelen = 0;
# 1079|   
# 1080|-> 		data = gc.data.data;
# 1081|   		size = gc.data.size;
# 1082|   		if ((flags & GRID_STRING_ESCAPE_SEQUENCES) &&

Error: CLANG_WARNING: [#def97]
tmux-3.4-build/tmux-3.4/grid.c:1286:9: warning[core.NullDereference]: Access to field 'cellused' results in a dereference of a null pointer (loaded from variable 'from')
# 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: CLANG_WARNING: [#def98]
tmux-3.4-build/tmux-3.4/grid.c:1321:34: warning[core.DivideZero]: Division by zero
# 1319|   	/* How many lines do we need to insert? We know we need at least two. */
# 1320|   	if (~gl->flags & GRID_LINE_EXTENDED)
# 1321|-> 		lines = 1 + (gl->cellused - 1) / sx;
# 1322|   	else {
# 1323|   		lines = 2;

Error: CPPCHECK_WARNING: [#def99]
tmux-3.4-build/tmux-3.4/hyperlinks.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def100]
tmux-3.4-build/tmux-3.4/hyperlinks.c:88:23: warning[core.UndefinedBinaryOperatorResult]: The left operand of '-' is a garbage value
#   86|   		if (*right->internal_id != '\0')
#   87|   			return (1);
#   88|-> 		return (left->inner - right->inner);
#   89|   	}
#   90|   

Error: CPPCHECK_WARNING: [#def101]
tmux-3.4-build/tmux-3.4/image-sixel.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def102]
tmux-3.4-build/tmux-3.4/image-sixel.c:546:4: warning[core.CallAndMessage]: 5th function call argument is an uninitialized value
#  544|   					count++;
#  545|   			}
#  546|-> 			sixel_print_repeat(&buf, &len, &used, count, data);
#  547|   			sixel_print_add(&buf, &len, &used, "$", 1);
#  548|   		}

Error: GCC_ANALYZER_WARNING (CWE-457): [#def103]
tmux-3.4-build/tmux-3.4/image-sixel.c: scope_hint: In function ‘sixel_print’
tmux-3.4-build/tmux-3.4/image-sixel.c:546:25: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘data’
#  544|   					count++;
#  545|   			}
#  546|-> 			sixel_print_repeat(&buf, &len, &used, count, data);
#  547|   			sixel_print_add(&buf, &len, &used, "$", 1);
#  548|   		}

Error: COMPILER_WARNING (CWE-457): [#def104]
tmux-3.4-build/tmux-3.4/image-sixel.c: scope_hint: In function ‘sixel_print’
tmux-3.4-build/tmux-3.4/image-sixel.c:546:25: warning[-Wmaybe-uninitialized]: ‘data’ may be used uninitialized
#  546 |                         sixel_print_repeat(&buf, &len, &used, count, data);
#      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tmux-3.4-build/tmux-3.4/image-sixel.c:480:59: note: ‘data’ was declared here
#  480 |         char                    *buf, tmp[64], *contains, data, last = 0;
#      |                                                           ^~~~
#  544|   					count++;
#  545|   			}
#  546|-> 			sixel_print_repeat(&buf, &len, &used, count, data);
#  547|   			sixel_print_add(&buf, &len, &used, "$", 1);
#  548|   		}

Error: CPPCHECK_WARNING: [#def105]
tmux-3.4-build/tmux-3.4/input-keys.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING (CWE-681): [#def106]
tmux-3.4-build/tmux-3.4/input-keys.c: scope_hint: In function ‘input_key’
tmux-3.4-build/tmux-3.4/input-keys.c:445:48: warning[-Wpointer-sign]: pointer targets in passing argument 3 of ‘input_key_write’ differ in signedness
#  445 |                 input_key_write(__func__, bev, &ud.data[0], 1);
#      |                                                ^~~~~~~~~~~
#      |                                                |
#      |                                                u_char * {aka unsigned char *}
tmux-3.4-build/tmux-3.4/input-keys.c:422:72: note: expected ‘const char *’ but argument is of type ‘u_char *’ {aka ‘unsigned char *’}
#  422 | input_key_write(const char *from, struct bufferevent *bev, const char *data,
#      |                                                            ~~~~~~~~~~~~^~~~
#  443|   	if (key & KEYC_LITERAL) {
#  444|   		ud.data[0] = (u_char)key;
#  445|-> 		input_key_write(__func__, bev, &ud.data[0], 1);
#  446|   		return (0);
#  447|   	}

Error: COMPILER_WARNING (CWE-681): [#def107]
tmux-3.4-build/tmux-3.4/input-keys.c:466:48: warning[-Wpointer-sign]: pointer targets in passing argument 3 of ‘input_key_write’ differ in signedness
#  466 |                 input_key_write(__func__, bev, &ud.data[0], 1);
#      |                                                ^~~~~~~~~~~
#      |                                                |
#      |                                                u_char * {aka unsigned char *}
tmux-3.4-build/tmux-3.4/input-keys.c:422:72: note: expected ‘const char *’ but argument is of type ‘u_char *’ {aka ‘unsigned char *’}
#  422 | input_key_write(const char *from, struct bufferevent *bev, const char *data,
#      |                                                            ~~~~~~~~~~~~^~~~
#  464|   			input_key_write(__func__, bev, "\033", 1);
#  465|   		ud.data[0] = justkey;
#  466|-> 		input_key_write(__func__, bev, &ud.data[0], 1);
#  467|   		return (0);
#  468|   	}

Error: COMPILER_WARNING (CWE-681): [#def108]
tmux-3.4-build/tmux-3.4/input-keys.c:473:50: warning[-Wpointer-sign]: pointer targets in passing argument 3 of ‘input_key_write’ differ in signedness
#  473 |                 input_key_write(__func__, bev, ud.data, ud.size);
#      |                                                ~~^~~~~
#      |                                                  |
#      |                                                  u_char * {aka unsigned char *}
tmux-3.4-build/tmux-3.4/input-keys.c:422:72: note: expected ‘const char *’ but argument is of type ‘u_char *’ {aka ‘unsigned char *’}
#  422 | input_key_write(const char *from, struct bufferevent *bev, const char *data,
#      |                                                            ~~~~~~~~~~~~^~~~
#  471|   			input_key_write(__func__, bev, "\033", 1);
#  472|   		utf8_to_data(justkey, &ud);
#  473|-> 		input_key_write(__func__, bev, ud.data, ud.size);
#  474|   		return (0);
#  475|   	}

Error: COMPILER_WARNING (CWE-681): [#def109]
tmux-3.4-build/tmux-3.4/input-keys.c: scope_hint: In function ‘input_key_get_mouse’
tmux-3.4-build/tmux-3.4/input-keys.c:636:69: warning[-Wpointer-sign]: pointer targets in passing argument 2 of ‘input_key_split2’ differ in signedness
#  636 |                 len += input_key_split2(m->b + MOUSE_PARAM_BTN_OFF, &buf[len]);
#      |                                                                     ^~~~~~~~~
#      |                                                                     |
#      |                                                                     char *
tmux-3.4-build/tmux-3.4/input-keys.c:359:35: note: expected ‘u_char *’ {aka ‘unsigned char *’} but argument is of type ‘char *’
#  359 | input_key_split2(u_int c, u_char *dst)
#      |                           ~~~~~~~~^~~
#  634|   			return (0);
#  635|   		len = xsnprintf(buf, sizeof buf, "\033[M");
#  636|-> 		len += input_key_split2(m->b + MOUSE_PARAM_BTN_OFF, &buf[len]);
#  637|   		len += input_key_split2(x + MOUSE_PARAM_POS_OFF, &buf[len]);
#  638|   		len += input_key_split2(y + MOUSE_PARAM_POS_OFF, &buf[len]);

Error: COMPILER_WARNING (CWE-681): [#def110]
tmux-3.4-build/tmux-3.4/input-keys.c:637:66: warning[-Wpointer-sign]: pointer targets in passing argument 2 of ‘input_key_split2’ differ in signedness
#  637 |                 len += input_key_split2(x + MOUSE_PARAM_POS_OFF, &buf[len]);
#      |                                                                  ^~~~~~~~~
#      |                                                                  |
#      |                                                                  char *
tmux-3.4-build/tmux-3.4/input-keys.c:359:35: note: expected ‘u_char *’ {aka ‘unsigned char *’} but argument is of type ‘char *’
#  359 | input_key_split2(u_int c, u_char *dst)
#      |                           ~~~~~~~~^~~
#  635|   		len = xsnprintf(buf, sizeof buf, "\033[M");
#  636|   		len += input_key_split2(m->b + MOUSE_PARAM_BTN_OFF, &buf[len]);
#  637|-> 		len += input_key_split2(x + MOUSE_PARAM_POS_OFF, &buf[len]);
#  638|   		len += input_key_split2(y + MOUSE_PARAM_POS_OFF, &buf[len]);
#  639|   	} else {

Error: COMPILER_WARNING (CWE-681): [#def111]
tmux-3.4-build/tmux-3.4/input-keys.c:638:66: warning[-Wpointer-sign]: pointer targets in passing argument 2 of ‘input_key_split2’ differ in signedness
#  638 |                 len += input_key_split2(y + MOUSE_PARAM_POS_OFF, &buf[len]);
#      |                                                                  ^~~~~~~~~
#      |                                                                  |
#      |                                                                  char *
tmux-3.4-build/tmux-3.4/input-keys.c:359:35: note: expected ‘u_char *’ {aka ‘unsigned char *’} but argument is of type ‘char *’
#  359 | input_key_split2(u_int c, u_char *dst)
#      |                           ~~~~~~~~^~~
#  636|   		len += input_key_split2(m->b + MOUSE_PARAM_BTN_OFF, &buf[len]);
#  637|   		len += input_key_split2(x + MOUSE_PARAM_POS_OFF, &buf[len]);
#  638|-> 		len += input_key_split2(y + MOUSE_PARAM_POS_OFF, &buf[len]);
#  639|   	} else {
#  640|   		if (m->b + MOUSE_PARAM_BTN_OFF > MOUSE_PARAM_MAX)

Error: CPPCHECK_WARNING: [#def112]
tmux-3.4-build/tmux-3.4/input.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING (CWE-681): [#def113]
tmux-3.4-build/tmux-3.4/input.c: scope_hint: In function ‘input_table_compare’
tmux-3.4-build/tmux-3.4/input.c:740:28: warning[-Wpointer-sign]: pointer targets in passing argument 1 of ‘strcmp’ differ in signedness
#  740 |         return (strcmp(ictx->interm_buf, entry->interm));
#      |                        ~~~~^~~~~~~~~~~~
#      |                            |
#      |                            const u_char * {aka const unsigned char *}
tmux-3.4-build/tmux-3.4/input.c:26: included_from: Included from here.
/usr/include/string.h:156:32: note: expected ‘const char *’ but argument is of type ‘const u_char *’ {aka ‘const unsigned char *’}
#  156 | extern int strcmp (const char *__s1, const char *__s2)
#      |                    ~~~~~~~~~~~~^~~~
#  738|   	if (ictx->ch != entry->ch)
#  739|   		return (ictx->ch - entry->ch);
#  740|-> 	return (strcmp(ictx->interm_buf, entry->interm));
#  741|   }
#  742|   

Error: CLANG_WARNING: [#def114]
tmux-3.4-build/tmux-3.4/input.c:912:10: warning[core.NullDereference]: Access to field 'transitions' results in a dereference of a null pointer (loaded from field 'state')
#  910|   		    ictx->ch < itr->first ||
#  911|   		    ictx->ch > itr->last) {
#  912|-> 			itr = ictx->state->transitions;
#  913|   			while (itr->first != -1 && itr->last != -1) {
#  914|   				if (ictx->ch >= itr->first &&

Error: COMPILER_WARNING (CWE-681): [#def115]
tmux-3.4-build/tmux-3.4/input.c: scope_hint: In function ‘input_split’
tmux-3.4-build/tmux-3.4/input.c:1029:13: warning[-Wpointer-sign]: pointer targets in assignment from ‘u_char *’ {aka ‘unsigned char *’} to ‘char *’ differ in signedness
# 1029 |         ptr = ictx->param_buf;
#      |             ^
# 1027|   	ip = &ictx->param_list[0];
# 1028|   
# 1029|-> 	ptr = ictx->param_buf;
# 1030|   	while ((out = strsep(&ptr, ";")) != NULL) {
# 1031|   		if (*out == '\0')

Error: COMPILER_WARNING (CWE-681): [#def116]
tmux-3.4-build/tmux-3.4/input.c: scope_hint: In function ‘input_dcs_dispatch’
tmux-3.4-build/tmux-3.4/input.c:2317:34: warning[-Wpointer-sign]: pointer targets in passing argument 1 of ‘sixel_parse’ differ in signedness
# 2317 |                 si = sixel_parse(buf, len, w->xpixel, w->ypixel);
#      |                                  ^~~
#      |                                  |
#      |                                  u_char * {aka unsigned char *}
tmux-3.4-build/tmux-3.4/input.c:29: included_from: Included from here.
tmux-3.4-build/tmux-3.4/tmux.h:3438:33: note: expected ‘const char *’ but argument is of type ‘u_char *’ {aka ‘unsigned char *’}
# 3438 | struct sixel_image *sixel_parse(const char *, size_t, u_int, u_int);
#      |                                 ^~~~~~~~~~~~
# 2315|   	w = wp->window;
# 2316|   	if (buf[0] == 'q') {
# 2317|-> 		si = sixel_parse(buf, len, w->xpixel, w->ypixel);
# 2318|   		if (si != NULL)
# 2319|   			screen_write_sixelimage(sctx, si, ictx->cell.cell.bg);

Error: COMPILER_WARNING (CWE-681): [#def117]
tmux-3.4-build/tmux-3.4/input.c:2328:41: warning[-Wpointer-sign]: pointer targets in passing argument 1 of ‘strncmp’ differ in signedness
# 2328 |         if (len >= prefixlen && strncmp(buf, prefix, prefixlen) == 0) {
#      |                                         ^~~
#      |                                         |
#      |                                         u_char * {aka unsigned char *}
/usr/include/string.h:159:33: note: expected ‘const char *’ but argument is of type ‘u_char *’ {aka ‘unsigned char *’}
#  159 | extern int strncmp (const char *__s1, const char *__s2, size_t __n)
#      |                     ~~~~~~~~~~~~^~~~
# 2326|   	log_debug("%s: \"%s\"", __func__, buf);
# 2327|   
# 2328|-> 	if (len >= prefixlen && strncmp(buf, prefix, prefixlen) == 0) {
# 2329|   		screen_write_rawstring(sctx, buf + prefixlen, len - prefixlen,
# 2330|   		    allow_passthrough == 2);

Error: COMPILER_WARNING (CWE-681): [#def118]
tmux-3.4-build/tmux-3.4/input.c: scope_hint: In function ‘input_exit_osc’
tmux-3.4-build/tmux-3.4/input.c:2375:47: warning[-Wpointer-sign]: pointer targets in passing argument 2 of ‘screen_set_title’ differ in signedness
# 2375 |                 if (screen_set_title(sctx->s, p) && wp != NULL) {
#      |                                               ^
#      |                                               |
#      |                                               u_char * {aka unsigned char *}
tmux-3.4-build/tmux-3.4/tmux.h:3013:44: note: expected ‘const char *’ but argument is of type ‘u_char *’ {aka ‘unsigned char *’}
# 3013 | int      screen_set_title(struct screen *, const char *);
#      |                                            ^~~~~~~~~~~~
# 2373|   	case 0:
# 2374|   	case 2:
# 2375|-> 		if (screen_set_title(sctx->s, p) && wp != NULL) {
# 2376|   			notify_pane("pane-title-changed", wp);
# 2377|   			server_redraw_window_borders(wp->window);

Error: COMPILER_WARNING (CWE-681): [#def119]
tmux-3.4-build/tmux-3.4/input.c:2382:35: warning[-Wpointer-sign]: pointer targets in passing argument 2 of ‘input_osc_4’ differ in signedness
# 2382 |                 input_osc_4(ictx, p);
#      |                                   ^
#      |                                   |
#      |                                   u_char * {aka unsigned char *}
tmux-3.4-build/tmux-3.4/input.c:137:49: note: expected ‘const char *’ but argument is of type ‘u_char *’ {aka ‘unsigned char *’}
#  137 | static void     input_osc_4(struct input_ctx *, const char *);
#      |                                                 ^~~~~~~~~~~~
# 2380|   		break;
# 2381|   	case 4:
# 2382|-> 		input_osc_4(ictx, p);
# 2383|   		break;
# 2384|   	case 7:

Error: COMPILER_WARNING (CWE-681): [#def120]
tmux-3.4-build/tmux-3.4/input.c:2385:34: warning[-Wpointer-sign]: pointer targets in passing argument 1 of ‘utf8_isvalid’ differ in signedness
# 2385 |                 if (utf8_isvalid(p)) {
#      |                                  ^
#      |                                  |
#      |                                  u_char * {aka unsigned char *}
tmux-3.4-build/tmux-3.4/tmux.h:3329:31: note: expected ‘const char *’ but argument is of type ‘u_char *’ {aka ‘unsigned char *’}
# 3329 | int              utf8_isvalid(const char *);
#      |                               ^~~~~~~~~~~~
# 2383|   		break;
# 2384|   	case 7:
# 2385|-> 		if (utf8_isvalid(p)) {
# 2386|   			screen_set_path(sctx->s, p);
# 2387|   			if (wp != NULL) {

Error: COMPILER_WARNING (CWE-681): [#def121]
tmux-3.4-build/tmux-3.4/input.c:2386:50: warning[-Wpointer-sign]: pointer targets in passing argument 2 of ‘screen_set_path’ differ in signedness
# 2386 |                         screen_set_path(sctx->s, p);
#      |                                                  ^
#      |                                                  |
#      |                                                  u_char * {aka unsigned char *}
tmux-3.4-build/tmux-3.4/tmux.h:3014:43: note: expected ‘const char *’ but argument is of type ‘u_char *’ {aka ‘unsigned char *’}
# 3014 | void     screen_set_path(struct screen *, const char *);
#      |                                           ^~~~~~~~~~~~
# 2384|   	case 7:
# 2385|   		if (utf8_isvalid(p)) {
# 2386|-> 			screen_set_path(sctx->s, p);
# 2387|   			if (wp != NULL) {
# 2388|   				server_redraw_window_borders(wp->window);

Error: COMPILER_WARNING (CWE-681): [#def122]
tmux-3.4-build/tmux-3.4/input.c:2394:35: warning[-Wpointer-sign]: pointer targets in passing argument 2 of ‘input_osc_8’ differ in signedness
# 2394 |                 input_osc_8(ictx, p);
#      |                                   ^
#      |                                   |
#      |                                   u_char * {aka unsigned char *}
tmux-3.4-build/tmux-3.4/input.c:138:49: note: expected ‘const char *’ but argument is of type ‘u_char *’ {aka ‘unsigned char *’}
#  138 | static void     input_osc_8(struct input_ctx *, const char *);
#      |                                                 ^~~~~~~~~~~~
# 2392|   		break;
# 2393|   	case 8:
# 2394|-> 		input_osc_8(ictx, p);
# 2395|   		break;
# 2396|   	case 10:

Error: COMPILER_WARNING (CWE-681): [#def123]
tmux-3.4-build/tmux-3.4/input.c:2397:36: warning[-Wpointer-sign]: pointer targets in passing argument 2 of ‘input_osc_10’ differ in signedness
# 2397 |                 input_osc_10(ictx, p);
#      |                                    ^
#      |                                    |
#      |                                    u_char * {aka unsigned char *}
tmux-3.4-build/tmux-3.4/input.c:139:50: note: expected ‘const char *’ but argument is of type ‘u_char *’ {aka ‘unsigned char *’}
#  139 | static void     input_osc_10(struct input_ctx *, const char *);
#      |                                                  ^~~~~~~~~~~~
# 2395|   		break;
# 2396|   	case 10:
# 2397|-> 		input_osc_10(ictx, p);
# 2398|   		break;
# 2399|   	case 11:

Error: COMPILER_WARNING (CWE-681): [#def124]
tmux-3.4-build/tmux-3.4/input.c:2400:36: warning[-Wpointer-sign]: pointer targets in passing argument 2 of ‘input_osc_11’ differ in signedness
# 2400 |                 input_osc_11(ictx, p);
#      |                                    ^
#      |                                    |
#      |                                    u_char * {aka unsigned char *}
tmux-3.4-build/tmux-3.4/input.c:140:50: note: expected ‘const char *’ but argument is of type ‘u_char *’ {aka ‘unsigned char *’}
#  140 | static void     input_osc_11(struct input_ctx *, const char *);
#      |                                                  ^~~~~~~~~~~~
# 2398|   		break;
# 2399|   	case 11:
# 2400|-> 		input_osc_11(ictx, p);
# 2401|   		break;
# 2402|   	case 12:

Error: COMPILER_WARNING (CWE-681): [#def125]
tmux-3.4-build/tmux-3.4/input.c:2403:36: warning[-Wpointer-sign]: pointer targets in passing argument 2 of ‘input_osc_12’ differ in signedness
# 2403 |                 input_osc_12(ictx, p);
#      |                                    ^
#      |                                    |
#      |                                    u_char * {aka unsigned char *}
tmux-3.4-build/tmux-3.4/input.c:141:50: note: expected ‘const char *’ but argument is of type ‘u_char *’ {aka ‘unsigned char *’}
#  141 | static void     input_osc_12(struct input_ctx *, const char *);
#      |                                                  ^~~~~~~~~~~~
# 2401|   		break;
# 2402|   	case 12:
# 2403|-> 		input_osc_12(ictx, p);
# 2404|   		break;
# 2405|   	case 52:

Error: COMPILER_WARNING (CWE-681): [#def126]
tmux-3.4-build/tmux-3.4/input.c:2406:36: warning[-Wpointer-sign]: pointer targets in passing argument 2 of ‘input_osc_52’ differ in signedness
# 2406 |                 input_osc_52(ictx, p);
#      |                                    ^
#      |                                    |
#      |                                    u_char * {aka unsigned char *}
tmux-3.4-build/tmux-3.4/input.c:142:50: note: expected ‘const char *’ but argument is of type ‘u_char *’ {aka ‘unsigned char *’}
#  142 | static void     input_osc_52(struct input_ctx *, const char *);
#      |                                                  ^~~~~~~~~~~~
# 2404|   		break;
# 2405|   	case 52:
# 2406|-> 		input_osc_52(ictx, p);
# 2407|   		break;
# 2408|   	case 104:

Error: COMPILER_WARNING (CWE-681): [#def127]
tmux-3.4-build/tmux-3.4/input.c:2409:37: warning[-Wpointer-sign]: pointer targets in passing argument 2 of ‘input_osc_104’ differ in signedness
# 2409 |                 input_osc_104(ictx, p);
#      |                                     ^
#      |                                     |
#      |                                     u_char * {aka unsigned char *}
tmux-3.4-build/tmux-3.4/input.c:143:51: note: expected ‘const char *’ but argument is of type ‘u_char *’ {aka ‘unsigned char *’}
#  143 | static void     input_osc_104(struct input_ctx *, const char *);
#      |                                                   ^~~~~~~~~~~~
# 2407|   		break;
# 2408|   	case 104:
# 2409|-> 		input_osc_104(ictx, p);
# 2410|   		break;
# 2411|   	case 110:

Error: COMPILER_WARNING (CWE-681): [#def128]
tmux-3.4-build/tmux-3.4/input.c:2412:37: warning[-Wpointer-sign]: pointer targets in passing argument 2 of ‘input_osc_110’ differ in signedness
# 2412 |                 input_osc_110(ictx, p);
#      |                                     ^
#      |                                     |
#      |                                     u_char * {aka unsigned char *}
tmux-3.4-build/tmux-3.4/input.c:144:51: note: expected ‘const char *’ but argument is of type ‘u_char *’ {aka ‘unsigned char *’}
#  144 | static void     input_osc_110(struct input_ctx *, const char *);
#      |                                                   ^~~~~~~~~~~~
# 2410|   		break;
# 2411|   	case 110:
# 2412|-> 		input_osc_110(ictx, p);
# 2413|   		break;
# 2414|   	case 111:

Error: COMPILER_WARNING (CWE-681): [#def129]
tmux-3.4-build/tmux-3.4/input.c:2415:37: warning[-Wpointer-sign]: pointer targets in passing argument 2 of ‘input_osc_111’ differ in signedness
# 2415 |                 input_osc_111(ictx, p);
#      |                                     ^
#      |                                     |
#      |                                     u_char * {aka unsigned char *}
tmux-3.4-build/tmux-3.4/input.c:145:51: note: expected ‘const char *’ but argument is of type ‘u_char *’ {aka ‘unsigned char *’}
#  145 | static void     input_osc_111(struct input_ctx *, const char *);
#      |                                                   ^~~~~~~~~~~~
# 2413|   		break;
# 2414|   	case 111:
# 2415|-> 		input_osc_111(ictx, p);
# 2416|   		break;
# 2417|   	case 112:

Error: COMPILER_WARNING (CWE-681): [#def130]
tmux-3.4-build/tmux-3.4/input.c:2418:37: warning[-Wpointer-sign]: pointer targets in passing argument 2 of ‘input_osc_112’ differ in signedness
# 2418 |                 input_osc_112(ictx, p);
#      |                                     ^
#      |                                     |
#      |                                     u_char * {aka unsigned char *}
tmux-3.4-build/tmux-3.4/input.c:146:51: note: expected ‘const char *’ but argument is of type ‘u_char *’ {aka ‘unsigned char *’}
#  146 | static void     input_osc_112(struct input_ctx *, const char *);
#      |                                                   ^~~~~~~~~~~~
# 2416|   		break;
# 2417|   	case 112:
# 2418|-> 		input_osc_112(ictx, p);
# 2419|   		break;
# 2420|   	case 133:

Error: COMPILER_WARNING (CWE-681): [#def131]
tmux-3.4-build/tmux-3.4/input.c:2421:37: warning[-Wpointer-sign]: pointer targets in passing argument 2 of ‘input_osc_133’ differ in signedness
# 2421 |                 input_osc_133(ictx, p);
#      |                                     ^
#      |                                     |
#      |                                     u_char * {aka unsigned char *}
tmux-3.4-build/tmux-3.4/input.c:147:51: note: expected ‘const char *’ but argument is of type ‘u_char *’ {aka ‘unsigned char *’}
#  147 | static void     input_osc_133(struct input_ctx *, const char *);
#      |                                                   ^~~~~~~~~~~~
# 2419|   		break;
# 2420|   	case 133:
# 2421|-> 		input_osc_133(ictx, p);
# 2422|   		break;
# 2423|   	default:

Error: COMPILER_WARNING (CWE-681): [#def132]
tmux-3.4-build/tmux-3.4/input.c: scope_hint: In function ‘input_exit_apc’
tmux-3.4-build/tmux-3.4/input.c:2451:43: warning[-Wpointer-sign]: pointer targets in passing argument 2 of ‘screen_set_title’ differ in signedness
# 2451 |         if (screen_set_title(sctx->s, ictx->input_buf) && wp != NULL) {
#      |                                       ~~~~^~~~~~~~~~~
#      |                                           |
#      |                                           u_char * {aka unsigned char *}
tmux-3.4-build/tmux-3.4/tmux.h:3013:44: note: expected ‘const char *’ but argument is of type ‘u_char *’ {aka ‘unsigned char *’}
# 3013 | int      screen_set_title(struct screen *, const char *);
#      |                                            ^~~~~~~~~~~~
# 2449|   	log_debug("%s: \"%s\"", __func__, ictx->input_buf);
# 2450|   
# 2451|-> 	if (screen_set_title(sctx->s, ictx->input_buf) && wp != NULL) {
# 2452|   		notify_pane("pane-title-changed", wp);
# 2453|   		server_redraw_window_borders(wp->window);

Error: COMPILER_WARNING (CWE-681): [#def133]
tmux-3.4-build/tmux-3.4/input.c: scope_hint: In function ‘input_exit_rename’
tmux-3.4-build/tmux-3.4/input.c:2485:31: warning[-Wpointer-sign]: pointer targets in passing argument 1 of ‘utf8_isvalid’ differ in signedness
# 2485 |         if (!utf8_isvalid(ictx->input_buf))
#      |                           ~~~~^~~~~~~~~~~
#      |                               |
#      |                               u_char * {aka unsigned char *}
tmux-3.4-build/tmux-3.4/tmux.h:3329:31: note: expected ‘const char *’ but argument is of type ‘u_char *’ {aka ‘unsigned char *’}
# 3329 | int              utf8_isvalid(const char *);
#      |                               ^~~~~~~~~~~~
# 2483|   	log_debug("%s: \"%s\"", __func__, ictx->input_buf);
# 2484|   
# 2485|-> 	if (!utf8_isvalid(ictx->input_buf))
# 2486|   		return;
# 2487|   	w = wp->window;

Error: COMPILER_WARNING (CWE-681): [#def134]
tmux-3.4-build/tmux-3.4/input.c:2497:40: warning[-Wpointer-sign]: pointer targets in passing argument 2 of ‘window_set_name’ differ in signedness
# 2497 |                 window_set_name(w, ictx->input_buf);
#      |                                    ~~~~^~~~~~~~~~~
#      |                                        |
#      |                                        u_char * {aka unsigned char *}
tmux-3.4-build/tmux-3.4/tmux.h:3111:51: note: expected ‘const char *’ but argument is of type ‘u_char *’ {aka ‘unsigned char *’}
# 3111 | void             window_set_name(struct window *, const char *);
#      |                                                   ^~~~~~~~~~~~
# 2495|   	} else {
# 2496|   		options_set_number(w->options, "automatic-rename", 0);
# 2497|-> 		window_set_name(w, ictx->input_buf);
# 2498|   	}
# 2499|   	server_redraw_window_borders(w);

Error: COMPILER_WARNING (CWE-681): [#def135]
tmux-3.4-build/tmux-3.4/input.c: scope_hint: In function ‘input_osc_52’
tmux-3.4-build/tmux-3.4/input.c:2894:25: warning[-Wpointer-sign]: pointer targets in passing argument 2 of ‘paste_add’ differ in signedness
# 2894 |         paste_add(NULL, out, outlen);
#      |                         ^~~
#      |                         |
#      |                         u_char * {aka unsigned char *}
tmux-3.4-build/tmux-3.4/tmux.h:2149:42: note: expected ‘char *’ but argument is of type ‘u_char *’ {aka ‘unsigned char *’}
# 2149 | void             paste_add(const char *, char *, size_t);
#      |                                          ^~~~~~
# 2892|   	notify_pane("pane-set-clipboard", wp);
# 2893|   
# 2894|-> 	paste_add(NULL, out, outlen);
# 2895|   }
# 2896|   

Error: COMPILER_WARNING (CWE-681): [#def136]
tmux-3.4-build/tmux-3.4/input.c: scope_hint: In function ‘input_reply_clipboard’
tmux-3.4-build/tmux-3.4/input.c:2946:40: warning[-Wpointer-sign]: pointer targets in passing argument 1 of ‘__b64_ntop’ differ in signedness
# 2946 |                 if ((outlen = b64_ntop(buf, len, out, outlen)) == -1) {
#      |                                        ^~~
#      |                                        |
#      |                                        const char *
tmux-3.4-build/tmux-3.4/input.c:24: included_from: Included from here.
/usr/include/resolv.h:244:27: note: expected ‘const unsigned char *’ but argument is of type ‘const char *’
#  244 | int             b64_ntop (const unsigned char *, size_t, char *, size_t)
#      |                           ^~~~~~~~~~~~~~~~~~~~~
# 2944|   		outlen = 4 * ((len + 2) / 3) + 1;
# 2945|   		out = xmalloc(outlen);
# 2946|-> 		if ((outlen = b64_ntop(buf, len, out, outlen)) == -1) {
# 2947|   			free(out);
# 2948|   			return;

Error: CPPCHECK_WARNING: [#def137]
tmux-3.4-build/tmux-3.4/job.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def138]
tmux-3.4-build/tmux-3.4/job.c:117:4: warning[core.CallAndMessage]: 1st function call argument is an uninitialized value
#  115|   	case -1:
#  116|   		if (~flags & JOB_PTY) {
#  117|-> 			close(out[0]);
#  118|   			close(out[1]);
#  119|   		}

Error: CLANG_WARNING: [#def139]
tmux-3.4-build/tmux-3.4/job.c:134:8: warning[core.CallAndMessage]: 1st function call argument is an uninitialized value
#  132|   
#  133|   		if (~flags & JOB_PTY) {
#  134|-> 			if (dup2(out[1], STDIN_FILENO) == -1)
#  135|   				fatal("dup2 failed");
#  136|   			if (dup2(out[1], STDOUT_FILENO) == -1)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def140]
tmux-3.4-build/tmux-3.4/job.c: scope_hint: In function ‘job_run’
tmux-3.4-build/tmux-3.4/job.c:134:28: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dup2(out[1], 0)’
#  132|   
#  133|   		if (~flags & JOB_PTY) {
#  134|-> 			if (dup2(out[1], STDIN_FILENO) == -1)
#  135|   				fatal("dup2 failed");
#  136|   			if (dup2(out[1], STDOUT_FILENO) == -1)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def141]
tmux-3.4-build/tmux-3.4/job.c:136:28: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dup2(out[1], 1)’
#  134|   			if (dup2(out[1], STDIN_FILENO) == -1)
#  135|   				fatal("dup2 failed");
#  136|-> 			if (dup2(out[1], STDOUT_FILENO) == -1)
#  137|   				fatal("dup2 failed");
#  138|   			if (out[1] != STDIN_FILENO && out[1] != STDOUT_FILENO)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def142]
tmux-3.4-build/tmux-3.4/job.c:145:28: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dup2(open("/dev/null", 2), 2)’
#  143|   			if (nullfd == -1)
#  144|   				fatal("open failed");
#  145|-> 			if (dup2(nullfd, STDERR_FILENO) == -1)
#  146|   				fatal("dup2 failed");
#  147|   			if (nullfd != STDERR_FILENO)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def143]
tmux-3.4-build/tmux-3.4/job.c:145:28: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/null", 2)’
#  143|   			if (nullfd == -1)
#  144|   				fatal("open failed");
#  145|-> 			if (dup2(nullfd, STDERR_FILENO) == -1)
#  146|   				fatal("dup2 failed");
#  147|   			if (nullfd != STDERR_FILENO)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def144]
tmux-3.4-build/tmux-3.4/job.c:147:28: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/null", 2)’
#  145|   			if (dup2(nullfd, STDERR_FILENO) == -1)
#  146|   				fatal("dup2 failed");
#  147|-> 			if (nullfd != STDERR_FILENO)
#  148|   				close(nullfd);
#  149|   		}

Error: CLANG_WARNING: [#def145]
tmux-3.4-build/tmux-3.4/job.c:185:3: warning[core.CallAndMessage]: 1st function call argument is an uninitialized value
#  183|   
#  184|   	if (~flags & JOB_PTY) {
#  185|-> 		close(out[1]);
#  186|   		job->fd = out[0];
#  187|   	} else

Error: CLANG_WARNING: [#def146]
tmux-3.4-build/tmux-3.4/job.c:188:11: warning[core.uninitialized.Assign]: Assigned value is garbage or undefined
#  186|   		job->fd = out[0];
#  187|   	} else
#  188|-> 		job->fd = master;
#  189|   	setblocking(job->fd, 0);
#  190|   

Error: CPPCHECK_WARNING: [#def147]
tmux-3.4-build/tmux-3.4/key-bindings.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def148]
tmux-3.4-build/tmux-3.4/key-string.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def149]
tmux-3.4-build/tmux-3.4/layout-custom.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def150]
tmux-3.4-build/tmux-3.4/layout-set.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def151]
tmux-3.4-build/tmux-3.4/layout.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def152]
tmux-3.4-build/tmux-3.4/layout.c:82:4: warning[unix.Malloc]: Use of memory after it is freed
#   80|   		while (!TAILQ_EMPTY(&lc->cells)) {
#   81|   			lcchild = TAILQ_FIRST(&lc->cells);
#   82|-> 			TAILQ_REMOVE(&lc->cells, lcchild, entry);
#   83|   			layout_free_cell(lcchild);
#   84|   		}

Error: CLANG_WARNING: [#def153]
tmux-3.4-build/tmux-3.4/layout.c:743:30: warning[core.DivideZero]: Division by zero
#  741|   		if (lc->sy - available > min)
#  742|   			min = lc->sy - available;
#  743|-> 		new_size = (lc->sy * size) / previous;
#  744|   	}
#  745|   

Error: CPPCHECK_WARNING: [#def154]
tmux-3.4-build/tmux-3.4/menu.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def155]
tmux-3.4-build/tmux-3.4/mode-tree.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def156]
tmux-3.4-build/tmux-3.4/mode-tree.c:309:7: warning[core.NullDereference]: Dereference of null pointer
#  307|   
#  308|   	for (i = 0; i < mtd->line_size; i++) {
#  309|-> 		if (mtd->line_list[i].item->tag == tag)
#  310|   			break;
#  311|   	}

Error: CLANG_WARNING: [#def157]
tmux-3.4-build/tmux-3.4/mode-tree.c:750:40: warning[core.NullDereference]: Access to field 'name' results in a dereference of a null pointer (loaded from variable 'mti')
#  748|   
#  749|   	if (mtd->sort_list != NULL) {
#  750|-> 		xasprintf(&text, " %s (sort: %s%s)", mti->name,
#  751|   		    mtd->sort_list[mtd->sort_crit.field],
#  752|   		    mtd->sort_crit.reversed ? ", reversed" : "");

Error: CLANG_WARNING: [#def158]
tmux-3.4-build/tmux-3.4/mode-tree.c:754:27: warning[core.NullDereference]: Access to field 'name' results in a dereference of a null pointer (loaded from variable 'mti')
#  752|   		    mtd->sort_crit.reversed ? ", reversed" : "");
#  753|   	} else
#  754|-> 		xasprintf(&text, " %s", mti->name);
#  755|   	if (w - 2 >= strlen(text)) {
#  756|   		screen_write_cursormove(&ctx, 1, h, 0);

Error: CPPCHECK_WARNING: [#def159]
tmux-3.4-build/tmux-3.4/notify.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def160]
tmux-3.4-build/tmux-3.4/options.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def161]
tmux-3.4-build/tmux-3.4/paste.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def162]
tmux-3.4-build/tmux-3.4/popup.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def163]
tmux-3.4-build/tmux-3.4/proc.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-476): [#def164]
tmux-3.4-build/tmux-3.4/regsub.c: scope_hint: In function ‘regsub’
tmux-3.4-build/tmux-3.4/regsub.c:116:18: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
#  114|   		}
#  115|   	}
#  116|-> 	buf[len] = '\0';
#  117|   
#  118|   	regfree(&r);

Error: CPPCHECK_WARNING: [#def165]
tmux-3.4-build/tmux-3.4/resize.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def166]
tmux-3.4-build/tmux-3.4/resize.c:458:20: warning[core.NullDereference]: Access to field 'statuslines' results in a dereference of a null pointer (loaded from variable 's')
#  456|   		if (ignore_client_size(c))
#  457|   			continue;
#  458|-> 		if (c->tty.sy <= s->statuslines || (c->flags & CLIENT_CONTROL))
#  459|   			c->flags |= CLIENT_STATUSOFF;
#  460|   		else

Error: CPPCHECK_WARNING: [#def167]
tmux-3.4-build/tmux-3.4/screen-redraw.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def168]
tmux-3.4-build/tmux-3.4/screen-write.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING (CWE-681): [#def169]
tmux-3.4-build/tmux-3.4/screen-write.c: scope_hint: In function ‘screen_write_strlen’
tmux-3.4-build/tmux-3.4/screen-write.c:364:13: warning[-Wpointer-sign]: pointer targets in assignment from ‘char *’ to ‘u_char *’ {aka ‘unsigned char *’} differ in signedness
#  364 |         ptr = msg;
#      |             ^
#  362|   	va_end(ap);
#  363|   
#  364|-> 	ptr = msg;
#  365|   	while (*ptr != '\0') {
#  366|   		if (*ptr > 0x7f && utf8_open(&ud, *ptr) == UTF8_MORE) {

Error: COMPILER_WARNING (CWE-681): [#def170]
tmux-3.4-build/tmux-3.4/screen-write.c:369:39: warning[-Wpointer-sign]: pointer targets in passing argument 1 of ‘strlen’ differ in signedness
#  369 |                         left = strlen(ptr);
#      |                                       ^~~
#      |                                       |
#      |                                       u_char * {aka unsigned char *}
tmux-3.4-build/tmux-3.4/screen-write.c:22: included_from: Included from here.
/usr/include/string.h:407:35: note: expected ‘const char *’ but argument is of type ‘u_char *’ {aka ‘unsigned char *’}
#  407 | extern size_t strlen (const char *__s)
#      |                       ~~~~~~~~~~~~^~~
#  367|   			ptr++;
#  368|   
#  369|-> 			left = strlen(ptr);
#  370|   			if (left < (size_t)ud.size - 1)
#  371|   				break;

Error: COMPILER_WARNING (CWE-681): [#def171]
tmux-3.4-build/tmux-3.4/screen-write.c: scope_hint: In function ‘screen_write_vnputs’
tmux-3.4-build/tmux-3.4/screen-write.c:517:13: warning[-Wpointer-sign]: pointer targets in assignment from ‘char *’ to ‘u_char *’ {aka ‘unsigned char *’} differ in signedness
#  517 |         ptr = msg;
#      |             ^
#  515|   	xvasprintf(&msg, fmt, ap);
#  516|   
#  517|-> 	ptr = msg;
#  518|   	while (*ptr != '\0') {
#  519|   		if (*ptr > 0x7f && utf8_open(ud, *ptr) == UTF8_MORE) {

Error: COMPILER_WARNING (CWE-681): [#def172]
tmux-3.4-build/tmux-3.4/screen-write.c:522:39: warning[-Wpointer-sign]: pointer targets in passing argument 1 of ‘strlen’ differ in signedness
#  522 |                         left = strlen(ptr);
#      |                                       ^~~
#      |                                       |
#      |                                       u_char * {aka unsigned char *}
/usr/include/string.h:407:35: note: expected ‘const char *’ but argument is of type ‘u_char *’ {aka ‘unsigned char *’}
#  407 | extern size_t strlen (const char *__s)
#      |                       ~~~~~~~~~~~~^~~
#  520|   			ptr++;
#  521|   
#  522|-> 			left = strlen(ptr);
#  523|   			if (left < (size_t)ud->size - 1)
#  524|   				break;

Error: CPPCHECK_WARNING (CWE-457): [#def173]
tmux-3.4-build/tmux-3.4/screen-write.c:1859: warning[uninitvar]: Uninitialized variable: gc.data.width
# 1857|   			    &grid_default_cell);
# 1858|   		}
# 1859|-> 		if (gc.data.width > 1) {
# 1860|   			grid_view_set_cell(s->grid, xx, s->cy,
# 1861|   			    &grid_default_cell);

Error: CPPCHECK_WARNING: [#def174]
tmux-3.4-build/tmux-3.4/screen.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def175]
tmux-3.4-build/tmux-3.4/screen.c:63:3: warning[unix.Malloc]: Use of memory after it is freed
#   61|   
#   62|   	while ((title_entry = TAILQ_FIRST(s->titles)) != NULL) {
#   63|-> 		TAILQ_REMOVE(s->titles, title_entry, entry);
#   64|   		free(title_entry->text);
#   65|   		free(title_entry);

Error: CPPCHECK_WARNING: [#def176]
tmux-3.4-build/tmux-3.4/server-acl.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def177]
tmux-3.4-build/tmux-3.4/server-client.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def178]
tmux-3.4-build/tmux-3.4/server-client.c:2394:18: warning[core.NullDereference]: Access to field 'cx' results in a dereference of a null pointer (loaded from variable 's')
# 2392|   		cursor = 0;
# 2393|   		tty_window_offset(tty, &ox, &oy, &sx, &sy);
# 2394|-> 		if (wp->xoff + s->cx >= ox && wp->xoff + s->cx <= ox + sx &&
# 2395|   		    wp->yoff + s->cy >= oy && wp->yoff + s->cy <= oy + sy) {
# 2396|   			cursor = 1;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def179]
tmux-3.4-build/tmux-3.4/server-client.c: scope_hint: In function ‘server_client_reset_state’
tmux-3.4-build/tmux-3.4/server-client.c:2394:33: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘s’
# 2392|   		cursor = 0;
# 2393|   		tty_window_offset(tty, &ox, &oy, &sx, &sy);
# 2394|-> 		if (wp->xoff + s->cx >= ox && wp->xoff + s->cx <= ox + sx &&
# 2395|   		    wp->yoff + s->cy >= oy && wp->yoff + s->cy <= oy + sy) {
# 2396|   			cursor = 1;

Error: COMPILER_WARNING (CWE-681): [#def180]
tmux-3.4-build/tmux-3.4/server-client.c: scope_hint: In function ‘server_client_print’
tmux-3.4-build/tmux-3.4/server-client.c:3287:21: warning[-Wpointer-sign]: pointer targets in assignment from ‘unsigned char *’ to ‘char *’ differ in signedness
# 3287 |                 msg = EVBUFFER_DATA(evb);
#      |                     ^
# 3285|   		log_debug("%s: %s", __func__, msg);
# 3286|   	} else {
# 3287|-> 		msg = EVBUFFER_DATA(evb);
# 3288|   		if (msg[size - 1] != '\0')
# 3289|   			evbuffer_add(evb, "", 1);

Error: COMPILER_WARNING (CWE-681): [#def181]
tmux-3.4-build/tmux-3.4/server-client.c:3327:30: warning[-Wpointer-sign]: pointer targets in assignment from ‘unsigned char *’ to ‘char *’ differ in signedness
# 3327 |                         line = EVBUFFER_DATA(evb);
#      |                              ^
# 3325|   		size = EVBUFFER_LENGTH(evb);
# 3326|   		if (size != 0) {
# 3327|-> 			line = EVBUFFER_DATA(evb);
# 3328|   			window_copy_add(wp, 1, "%.*s", (int)size, line);
# 3329|   		}

Error: CPPCHECK_WARNING: [#def182]
tmux-3.4-build/tmux-3.4/server-fn.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def183]
tmux-3.4-build/tmux-3.4/server.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def184]
tmux-3.4-build/tmux-3.4/session.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def185]
tmux-3.4-build/tmux-3.4/spawn.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def186]
tmux-3.4-build/tmux-3.4/spawn.c:181:8: warning[core.NullDereference]: Access to field 'name' results in a dereference of a null pointer (loaded from variable 'w')
#  179|   	/* Set the name of the new window. */
#  180|   	if (~sc->flags & SPAWN_RESPAWN) {
#  181|-> 		free(w->name);
#  182|   		if (sc->name != NULL) {
#  183|   			w->name = format_single(item, sc->name, c, s, NULL,

Error: GCC_ANALYZER_WARNING (CWE-476): [#def187]
tmux-3.4-build/tmux-3.4/spawn.c: scope_hint: In function ‘spawn_window’
tmux-3.4-build/tmux-3.4/spawn.c:181:23: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘w’
#  179|   	/* Set the name of the new window. */
#  180|   	if (~sc->flags & SPAWN_RESPAWN) {
#  181|-> 		free(w->name);
#  182|   		if (sc->name != NULL) {
#  183|   			w->name = format_single(item, sc->name, c, s, NULL,

Error: CPPCHECK_WARNING: [#def188]
tmux-3.4-build/tmux-3.4/status.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-476): [#def189]
tmux-3.4-build/tmux-3.4/status.c: scope_hint: In function ‘status_prompt_add_list’
tmux-3.4-build/tmux-3.4/status.c:1612:21: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘list’
# 1610|   
# 1611|   	for (i = 0; i < *size; i++) {
# 1612|-> 		if (strcmp((*list)[i], s) == 0)
# 1613|   			return;
# 1614|   	}

Error: GCC_ANALYZER_WARNING (CWE-476): [#def190]
tmux-3.4-build/tmux-3.4/status.c: scope_hint: In function ‘status_prompt_complete_window_menu’
tmux-3.4-build/tmux-3.4/status.c:1827:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘s’
tmux-3.4-build/tmux-3.4/compat.h:148: included_from: Included from here.
tmux-3.4-build/tmux-3.4/tmux.h:35: included_from: Included from here.
tmux-3.4-build/tmux-3.4/status.c:30: included_from: Included from here.
tmux-3.4-build/tmux-3.4/status.c:1812:9: note: in expansion of macro ‘RB_FOREACH’
# 1825|   			xasprintf(&list[size++], "%d", wl->idx);
# 1826|   		} else {
# 1827|-> 			xasprintf(&tmp, "%s:%d (%s)", s->name, wl->idx,
# 1828|   			    wl->window->name);
# 1829|   			xasprintf(&list[size++], "%s:%d", s->name, wl->idx);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def191]
tmux-3.4-build/tmux-3.4/status.c: scope_hint: In function ‘status_prompt_complete’
tmux-3.4-build/tmux-3.4/status.c:1980:44: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
# 1978|   		else {
# 1979|   			copy = xstrdup(s);
# 1980|-> 			*strchr(copy, ':') = '\0';
# 1981|   			session = session_find(copy);
# 1982|   			free(copy);

Error: CPPCHECK_WARNING: [#def192]
tmux-3.4-build/tmux-3.4/style.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def193]
tmux-3.4-build/tmux-3.4/style.c:329:3: warning[deadcode.DeadStores]: Value stored to 'comma' is never read
#  327|   		xsnprintf(s + off, sizeof s - off, "%s%s", comma,
#  328|   		    attributes_tostring(gc->attr));
#  329|-> 		comma = ",";
#  330|   	}
#  331|   

Error: CPPCHECK_WARNING: [#def194]
tmux-3.4-build/tmux-3.4/tmux.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def195]
tmux-3.4-build/tmux-3.4/tty-features.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def196]
tmux-3.4-build/tmux-3.4/tty-keys.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING (CWE-681): [#def197]
tmux-3.4-build/tmux-3.4/tty-keys.c: scope_hint: In function ‘tty_keys_next’
tmux-3.4-build/tmux-3.4/tty-keys.c:673:13: warning[-Wpointer-sign]: pointer targets in assignment from ‘unsigned char *’ to ‘const char *’ differ in signedness
#  673 |         buf = EVBUFFER_DATA(tty->in);
#      |             ^
#  671|   
#  672|   	/* Get key buffer. */
#  673|-> 	buf = EVBUFFER_DATA(tty->in);
#  674|   	len = EVBUFFER_LENGTH(tty->in);
#  675|   	if (len == 0)

Error: COMPILER_WARNING (CWE-681): [#def198]
tmux-3.4-build/tmux-3.4/tty-keys.c: scope_hint: In function ‘tty_keys_clipboard’
tmux-3.4-build/tmux-3.4/tty-keys.c:1238:38: warning[-Wpointer-sign]: pointer targets in passing argument 2 of ‘__b64_pton’ differ in signedness
# 1238 |         if ((outlen = b64_pton(copy, out, len)) == -1) {
#      |                                      ^~~
#      |                                      |
#      |                                      char *
tmux-3.4-build/tmux-3.4/tty-keys.c:26: included_from: Included from here.
/usr/include/resolv.h:246:41: note: expected ‘unsigned char *’ but argument is of type ‘char *’
#  246 | int             b64_pton (char const *, unsigned char *, size_t) __THROW;
#      |                                         ^~~~~~~~~~~~~~~
# 1236|   	needed = (end / 4) * 3;
# 1237|   	out = xmalloc(needed);
# 1238|-> 	if ((outlen = b64_pton(copy, out, len)) == -1) {
# 1239|   		free(out);
# 1240|   		free(copy);

Error: CLANG_WARNING: [#def199]
tmux-3.4-build/tmux-3.4/tty-keys.c:1547:17: warning[core.UndefinedBinaryOperatorResult]: The left operand of '==' is a garbage value due to array index out of bounds
# 1545|   	if (i == (sizeof tmp) - 1)
# 1546|   		return (-1);
# 1547|-> 	if (tmp[i - 1] == '\033')
# 1548|   		tmp[i - 1] = '\0';
# 1549|   	else

Error: CPPCHECK_WARNING: [#def200]
tmux-3.4-build/tmux-3.4/tty-term.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def201]
tmux-3.4-build/tmux-3.4/tty.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING (CWE-252): [#def202]
tmux-3.4-build/tmux-3.4/tty.c: scope_hint: In function ‘tty_add’
tmux-3.4-build/tmux-3.4/tty.c:599:17: warning[-Wunused-result]: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’
#  599 |                 write(tty_log_fd, buf, len);
#      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~
#  597|   
#  598|   	if (tty_log_fd != -1)
#  599|-> 		write(tty_log_fd, buf, len);
#  600|   	if (tty->flags & TTY_STARTED)
#  601|   		event_add(&tty->event_out, NULL);

Error: COMPILER_WARNING (CWE-681): [#def203]
tmux-3.4-build/tmux-3.4/tty.c: scope_hint: In function ‘tty_putc’
tmux-3.4-build/tmux-3.4/tty.c:627:38: warning[-Wpointer-sign]: pointer targets in passing argument 2 of ‘tty_add’ differ in signedness
#  627 |                         tty_add(tty, &ch, 1);
#      |                                      ^~~
#      |                                      |
#      |                                      u_char * {aka unsigned char *}
tmux-3.4-build/tmux-3.4/tty.c:585:38: note: expected ‘const char *’ but argument is of type ‘u_char *’ {aka ‘unsigned char *’}
#  585 | tty_add(struct tty *tty, const char *buf, size_t len)
#      |                          ~~~~~~~~~~~~^~~
#  625|   			tty_add(tty, acs, strlen(acs));
#  626|   		else
#  627|-> 			tty_add(tty, &ch, 1);
#  628|   	} else
#  629|   		tty_add(tty, &ch, 1);

Error: COMPILER_WARNING (CWE-681): [#def204]
tmux-3.4-build/tmux-3.4/tty.c:629:30: warning[-Wpointer-sign]: pointer targets in passing argument 2 of ‘tty_add’ differ in signedness
#  629 |                 tty_add(tty, &ch, 1);
#      |                              ^~~
#      |                              |
#      |                              u_char * {aka unsigned char *}
tmux-3.4-build/tmux-3.4/tty.c:585:38: note: expected ‘const char *’ but argument is of type ‘u_char *’ {aka ‘unsigned char *’}
#  585 | tty_add(struct tty *tty, const char *buf, size_t len)
#      |                          ~~~~~~~~~~~~^~~
#  627|   			tty_add(tty, &ch, 1);
#  628|   	} else
#  629|-> 		tty_add(tty, &ch, 1);
#  630|   
#  631|   	if (ch >= 0x20 && ch != 0x7f) {

Error: COMPILER_WARNING (CWE-681): [#def205]
tmux-3.4-build/tmux-3.4/tty.c: scope_hint: In function ‘tty_check_codeset’
tmux-3.4-build/tmux-3.4/tty.c:1368:46: warning[-Wpointer-sign]: pointer targets in passing argument 2 of ‘tty_acs_reverse_get’ differ in signedness
# 1368 |         c = tty_acs_reverse_get(tty, gc->data.data, gc->data.size);
#      |                                      ~~~~~~~~^~~~~
#      |                                              |
#      |                                              const u_char * {aka const unsigned char *}
tmux-3.4-build/tmux-3.4/tty.c:33: included_from: Included from here.
tmux-3.4-build/tmux-3.4/tmux.h:2445:52: note: expected ‘const char *’ but argument is of type ‘const u_char *’ {aka ‘const unsigned char *’}
# 2445 | int              tty_acs_reverse_get(struct tty *, const char *, size_t);
#      |                                                    ^~~~~~~~~~~~
# 1366|   
# 1367|   	/* See if this can be mapped to an ACS character. */
# 1368|-> 	c = tty_acs_reverse_get(tty, gc->data.data, gc->data.size);
# 1369|   	if (c != -1) {
# 1370|   		utf8_set(&new.data, c);

Error: COMPILER_WARNING (CWE-681): [#def206]
tmux-3.4-build/tmux-3.4/tty.c: scope_hint: In function ‘tty_set_selection’
tmux-3.4-build/tmux-3.4/tty.c:2235:18: warning[-Wpointer-sign]: pointer targets in passing argument 1 of ‘__b64_ntop’ differ in signedness
# 2235 |         b64_ntop(buf, len, encoded, size);
#      |                  ^~~
#      |                  |
#      |                  const char *
tmux-3.4-build/tmux-3.4/tty.c:27: included_from: Included from here.
/usr/include/resolv.h:244:27: note: expected ‘const unsigned char *’ but argument is of type ‘const char *’
#  244 | int             b64_ntop (const unsigned char *, size_t, char *, size_t)
#      |                           ^~~~~~~~~~~~~~~~~~~~~
# 2233|   	encoded = xmalloc(size);
# 2234|   
# 2235|-> 	b64_ntop(buf, len, encoded, size);
# 2236|   	tty->flags |= TTY_NOBLOCK;
# 2237|   	tty_putcode_ss(tty, TTYC_MS, flags, encoded);

Error: CPPCHECK_WARNING: [#def207]
tmux-3.4-build/tmux-3.4/utf8.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING (CWE-681): [#def208]
tmux-3.4-build/tmux-3.4/utf8.c: scope_hint: In function ‘utf8_towc’
tmux-3.4-build/tmux-3.4/utf8.c:438:30: warning[-Wpointer-sign]: pointer targets in passing argument 2 of ‘mbtowc’ differ in signedness
#  438 |         switch (mbtowc(wc, ud->data, ud->size)) {
#      |                            ~~^~~~~~
#      |                              |
#      |                              const u_char * {aka const unsigned char *}
tmux-3.4-build/tmux-3.4/utf8.c:23: included_from: Included from here.
/usr/include/stdlib.h:1066:43: note: expected ‘const char * restrict’ but argument is of type ‘const u_char *’ {aka ‘const unsigned char *’}
# 1066 |                    const char *__restrict __s, size_t __n) __THROW;
#      |                    ~~~~~~~~~~~~~~~~~~~~~~~^~~
#  436|   	switch (utf8proc_mbtowc(wc, ud->data, ud->size)) {
#  437|   #else
#  438|-> 	switch (mbtowc(wc, ud->data, ud->size)) {
#  439|   #endif
#  440|   	case -1:

Error: CPPCHECK_WARNING: [#def209]
tmux-3.4-build/tmux-3.4/window-buffer.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def210]
tmux-3.4-build/tmux-3.4/window-buffer.c:187:2: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull'
#  185|   
#  186|   	window_buffer_sort = sort_crit;
#  187|-> 	qsort(data->item_list, data->item_size, sizeof *data->item_list,
#  188|   	    window_buffer_cmp);
#  189|   

Error: CPPCHECK_WARNING: [#def211]
tmux-3.4-build/tmux-3.4/window-client.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def212]
tmux-3.4-build/tmux-3.4/window-client.c:193:2: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull'
#  191|   
#  192|   	window_client_sort = sort_crit;
#  193|-> 	qsort(data->item_list, data->item_size, sizeof *data->item_list,
#  194|   	    window_client_cmp);
#  195|   

Error: GCC_ANALYZER_WARNING (CWE-688): [#def213]
tmux-3.4-build/tmux-3.4/window-client.c: scope_hint: In function ‘window_client_build’
tmux-3.4-build/tmux-3.4/window-client.c:193:9: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
tmux-3.4-build/tmux-3.4/window-client.c:22: included_from: Included from here.
/usr/include/stdlib.h:970:13: note: argument 1 of ‘qsort’ must be non-null
#  191|   
#  192|   	window_client_sort = sort_crit;
#  193|-> 	qsort(data->item_list, data->item_size, sizeof *data->item_list,
#  194|   	    window_client_cmp);
#  195|   

Error: CPPCHECK_WARNING: [#def214]
tmux-3.4-build/tmux-3.4/window-clock.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def215]
tmux-3.4-build/tmux-3.4/window-copy.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING (CWE-252): [#def216]
tmux-3.4-build/tmux-3.4/window-copy.c: scope_hint: In function ‘window_copy_vadd’
tmux-3.4-build/tmux-3.4/window-copy.c:551:17: warning[-Wunused-result]: ignoring return value of ‘vasprintf’ declared with attribute ‘warn_unused_result’
#  551 |                 vasprintf(&text, fmt, ap);
#      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~
#  549|   
#  550|   	if (parse) {
#  551|-> 		vasprintf(&text, fmt, ap);
#  552|   		screen_write_start(&writing_ctx, writing);
#  553|   		screen_write_reset(&writing_ctx);

Error: COMPILER_WARNING (CWE-681): [#def217]
tmux-3.4-build/tmux-3.4/window-copy.c: scope_hint: In function ‘window_copy_vadd’
tmux-3.4-build/tmux-3.4/window-copy.c:555:27: warning[-Wpointer-sign]: pointer targets in passing argument 5 of ‘input_parse_screen’ differ in signedness
#  555 |                     data, text, strlen(text));
#      |                           ^~~~
#      |                           |
#      |                           char *
tmux-3.4-build/tmux-3.4/window-copy.c:27: included_from: Included from here.
tmux-3.4-build/tmux-3.4/tmux.h:2813:48: note: expected ‘u_char *’ {aka ‘unsigned char *’} but argument is of type ‘char *’
# 2813 |              screen_write_init_ctx_cb, void *, u_char *, size_t);
#      |                                                ^~~~~~~~
#  553|   		screen_write_reset(&writing_ctx);
#  554|   		input_parse_screen(data->ictx, writing, window_copy_init_ctx_cb,
#  555|-> 		    data, text, strlen(text));
#  556|   		free(text);
#  557|   	}

Error: COMPILER_WARNING (CWE-681): [#def218]
tmux-3.4-build/tmux-3.4/window-copy.c: scope_hint: In function ‘window_copy_cellstring’
tmux-3.4-build/tmux-3.4/window-copy.c:3315:25: warning[-Wpointer-sign]: pointer targets in returning ‘u_char *’ {aka ‘unsigned char *’} from a function with return type ‘const char *’ differ in signedness
# 3315 |                 return (&gce->data.data);
#      |                        ~^~~~~~~~~~~~~~~~
# 3313|   		*size = 1;
# 3314|   		*allocated = 0;
# 3315|-> 		return (&gce->data.data);
# 3316|   	}
# 3317|   

Error: GCC_ANALYZER_WARNING (CWE-688): [#def219]
tmux-3.4-build/tmux-3.4/window-copy.c: scope_hint: In function ‘window_copy_stringify’
tmux-3.4-build/tmux-3.4/window-copy.c:3410:25: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
<built-in>: note: argument 2 of ‘__builtin_memcpy’ must be non-null
# 3408|   			buf[bx++] = *d;
# 3409|   		else {
# 3410|-> 			memcpy(buf + bx, d, dlen);
# 3411|   			bx += dlen;
# 3412|   		}

Error: CLANG_WARNING: [#def220]
tmux-3.4-build/tmux-3.4/window-copy.c:3691:6: warning[core.NullDereference]: Array access (via field 'searchmark') results in a null pointer dereference
# 3689|   
# 3690|   	if (window_copy_search_mark_at(data, *fx, *fy, &start) == 0 &&
# 3691|-> 	    data->searchmark[start] != 0) {
# 3692|   		while (window_copy_search_mark_at(data, *fx, *fy, &at) == 0) {
# 3693|   			if (data->searchmark[at] != data->searchmark[start])

Error: COMPILER_WARNING (CWE-681): [#def221]
tmux-3.4-build/tmux-3.4/window-copy.c: scope_hint: In function ‘window_copy_append_selection’
tmux-3.4-build/tmux-3.4/window-copy.c:4778:53: warning[-Wpointer-sign]: pointer targets in passing argument 3 of ‘screen_write_setselection’ differ in signedness
# 4778 |                 screen_write_setselection(&ctx, "", buf, len);
#      |                                                     ^~~
#      |                                                     |
#      |                                                     char *
tmux-3.4-build/tmux-3.4/tmux.h:2989:14: note: expected ‘u_char *’ {aka ‘unsigned char *’} but argument is of type ‘char *’
# 2989 |              u_char *, u_int);
#      |              ^~~~~~~~
# 4776|   	if (options_get_number(global_options, "set-clipboard") != 0) {
# 4777|   		screen_write_start_pane(&ctx, wp, NULL);
# 4778|-> 		screen_write_setselection(&ctx, "", buf, len);
# 4779|   		screen_write_stop(&ctx);
# 4780|   		notify_pane("pane-set-clipboard", wp);

Error: CPPCHECK_WARNING: [#def222]
tmux-3.4-build/tmux-3.4/window-customize.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def223]
tmux-3.4-build/tmux-3.4/window-tree.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING (CWE-476): [#def224]
tmux-3.4-build/tmux-3.4/window-tree.c:440: warning[nullPointer]: Possible null pointer dereference: l
#  438|   	}
#  439|   	window_tree_sort = sort_crit;
#  440|-> 	qsort(l, n, sizeof *l, window_tree_cmp_window);
#  441|   
#  442|   	empty = 0;

Error: CLANG_WARNING: [#def225]
tmux-3.4-build/tmux-3.4/window-tree.c:440:2: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull'
#  438|   	}
#  439|   	window_tree_sort = sort_crit;
#  440|-> 	qsort(l, n, sizeof *l, window_tree_cmp_window);
#  441|   
#  442|   	empty = 0;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def226]
tmux-3.4-build/tmux-3.4/window-tree.c: scope_hint: In function ‘window_tree_build_session’
tmux-3.4-build/tmux-3.4/window-tree.c:440:9: warning[-Wanalyzer-null-argument]: use of NULL ‘l’ where non-null expected
tmux-3.4-build/tmux-3.4/compat.h:148: included_from: Included from here.
tmux-3.4-build/tmux-3.4/tmux.h:35: included_from: Included from here.
tmux-3.4-build/tmux-3.4/window-tree.c:25: included_from: Included from here.
tmux-3.4-build/tmux-3.4/window-tree.c:435:9: note: in expansion of macro ‘RB_FOREACH’
tmux-3.4-build/tmux-3.4/window-tree.c:22: included_from: Included from here.
/usr/include/stdlib.h:970:13: note: argument 1 of ‘qsort’ must be non-null
#  438|   	}
#  439|   	window_tree_sort = sort_crit;
#  440|-> 	qsort(l, n, sizeof *l, window_tree_cmp_window);
#  441|   
#  442|   	empty = 0;

Error: CPPCHECK_WARNING (CWE-476): [#def227]
tmux-3.4-build/tmux-3.4/window-tree.c:486: warning[nullPointer]: Possible null pointer dereference: l
#  484|   	}
#  485|   	window_tree_sort = sort_crit;
#  486|-> 	qsort(l, n, sizeof *l, window_tree_cmp_session);
#  487|   
#  488|   	for (i = 0; i < n; i++)

Error: CLANG_WARNING: [#def228]
tmux-3.4-build/tmux-3.4/window-tree.c:486:2: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull'
#  484|   	}
#  485|   	window_tree_sort = sort_crit;
#  486|-> 	qsort(l, n, sizeof *l, window_tree_cmp_session);
#  487|   
#  488|   	for (i = 0; i < n; i++)

Error: GCC_ANALYZER_WARNING (CWE-688): [#def229]
tmux-3.4-build/tmux-3.4/window-tree.c: scope_hint: In function ‘window_tree_build’
tmux-3.4-build/tmux-3.4/window-tree.c:486:9: warning[-Wanalyzer-null-argument]: use of NULL ‘l’ where non-null expected
tmux-3.4-build/tmux-3.4/window-tree.c:475:9: note: in expansion of macro ‘RB_FOREACH’
/usr/include/stdlib.h:970:13: note: argument 1 of ‘qsort’ must be non-null
#  484|   	}
#  485|   	window_tree_sort = sort_crit;
#  486|-> 	qsort(l, n, sizeof *l, window_tree_cmp_session);
#  487|   
#  488|   	for (i = 0; i < n; i++)

Error: CPPCHECK_WARNING: [#def230]
tmux-3.4-build/tmux-3.4/window.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def231]
tmux-3.4-build/tmux-3.4/window.c:1143:46: warning[unix.Malloc]: Use of memory after it is freed
# 1141|   		wp->screen = &wp->base;
# 1142|   	} else {
# 1143|-> 		log_debug("%s: next mode is %s", __func__, next->mode->name);
# 1144|   		wp->screen = next->screen;
# 1145|   		if (next->mode->resize != NULL)

Scan Properties

analyzer-version-clang18.1.7
analyzer-version-cppcheck2.14.2
analyzer-version-gcc14.1.1
analyzer-version-gcc-analyzer14.1.1
analyzer-version-shellcheck0.10.0
enabled-pluginsclang, cppcheck, gcc, shellcheck
exit-code0
hostip-172-16-1-117.us-west-2.compute.internal
mock-configfedora-41-x86_64
project-nametmux-3.4-1.fc41
store-results-to/tmp/tmphouo2414/tmux-3.4-1.fc41.tar.xz
time-created2024-07-03 18:08:19
time-finished2024-07-03 18:10:58
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmphouo2414/tmux-3.4-1.fc41.tar.xz' '--gcc-analyze' '/tmp/tmphouo2414/tmux-3.4-1.fc41.src.rpm'
tool-versioncsmock-3.5.3-1.el9