Skip to content
Snippets Groups Projects
Commit e7be2b25 authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

Fix the Coverity annotations

parent 074803a8
No related branches found
No related tags found
No related merge requests found
Pipeline #8163 failed
......@@ -1163,7 +1163,7 @@ int bitmap_setfont(int font, int force, int font_num)
old=malloc(ow*oh*sizeof(*old));
if(old) {
bitmap_vmem_gettext(1,1,ow,oh,old);
/* coverity[sleep]:SUPPRESS */
/* coverity[sleep:SUPPRESS] */
textmode(newmode);
new=malloc(ti.screenwidth*ti.screenheight*sizeof(*new));
if(!new) {
......
......@@ -1727,7 +1727,7 @@ x11_event(XEvent *ev)
if (x_cvstat.winwidth != w || x_cvstat.winheight != h) {
x_cvstat.winwidth = w;
x_cvstat.winheight = h;
// coverity[missing_lock]:SUPPRESS
// coverity[missing_lock:SUPPRESS]
x_cvstat.scaling = bitmap_double_mult_inside(w, h);
resize_xim();
}
......@@ -2044,7 +2044,7 @@ x11_event(XEvent *ev)
handle_bios_key(&bios_key, &bios_key_parsing, &zero_first);
}
else {
// coverity[overflow_const]:SUPPRESS
// coverity[overflow_const:SUPPRESS]
bios_key *= 10;
bios_key += (ks - XK_KP_0);
break;
......
......@@ -60,8 +60,8 @@ static bool
exit_function(SFTP_STATIC_TYPE state, bool retval)
{
assert(state->running > 0);
// coverity[missing_lock:SUPPRESS]
state->running--;
// coverity[missing_lock]:SUPPRESS
pthread_mutex_unlock(&state->mtx);
return retval;
}
......
......@@ -86,7 +86,7 @@ modem_output_thread(void *args)
}
sent = 0;
while (com != COM_HANDLE_INVALID && sent < wr && !conn_api.terminate) {
// coverity[overlow]:SUPPRESS
// coverity[overlow:SUPPRESS]
ret = comWriteBuf(com, conn_api.wr_buf + sent, wr - sent);
if (ret > 0)
sent += ret;
......
......@@ -64,7 +64,7 @@ rlogin_output_thread(void *args)
sent = 0;
while (rlogin_sock != INVALID_SOCKET && sent < wr && !conn_api.terminate) {
if (socket_writable(rlogin_sock, 100)) {
// coverity[overflow]:SUPPRESS
// coverity[overflow:SUPPRESS]
ret = sendsocket(rlogin_sock, conn_api.wr_buf + sent, wr - sent);
if (ret > 0)
sent += ret;
......
......@@ -320,7 +320,7 @@ ssh_output_thread(void *args)
SetThreadName("SSH Output");
conn_api.output_thread_running = 1;
// coverity[thread1_checks_field]:SUPPRESS
// coverity[thread1_checks_field:SUPPRESS]
while (ssh_active && !conn_api.terminate && !channel_gone && !ssh_complete) {
pthread_mutex_lock(&(conn_outbuf.mutex));
wr = conn_buf_wait_bytes(&conn_outbuf, 1, 100);
......
......@@ -778,12 +778,11 @@ static const struct {
};
char *output_types[] = {
/* coverity[missing_comma:SUPPRESS] */
"Autodetect"
#ifdef __unix__
/* coverity[missing_comma] */
" (X11, SDL, Curses, ANSI)"
#elif defined(_WIN32)
/* coverity[missing_comma] */
" (GDI, SDL, Console, ANSI)"
#endif
#ifdef __unix__
......
......@@ -975,7 +975,7 @@ do_xp_play_sample(unsigned char *sampo, size_t sz, int *freed)
if (handle_type == SOUND_DEVICE_OSS) {
size_t wr = 0;
while (wr < sz) {
// coverity[overflow]:SUPPRESS
// coverity[overflow:SUPPRESS]
ssize_t i = write(dsp, samp + wr, sz - wr);
if (i >= 0)
wr += i;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment