Hi,
Please find the latest report on new defect(s) introduced to Synchronet found with Coverity Scan.
3 new defect(s) introduced to Synchronet found with Coverity Scan.
4 defect(s), reported by Coverity Scan earlier, were marked fixed in the recent build analyzed by Coverity Scan.
New defect(s) Reported-by: Coverity Scan
Showing 3 of 3 defect(s)
** CID 454698: Incorrect expression (IDENTICAL_BRANCHES)
/tmp/sbbs-May-12-2023/src/conio/x_events.c: 336 in map_window()
________________________________________________________________________________________________________
*** CID 454698: Incorrect expression (IDENTICAL_BRANCHES)
/tmp/sbbs-May-12-2023/src/conio/x_events.c: 336 in map_window()
330 }
331
332 bitmap_get_scaled_win_size(x_cvstat.scaling, &sh->base_width, &sh->base_height, 0, 0);
333 bitmap_get_scaled_win_size(1.0, &sh->min_width, &sh->min_height, 0, 0);
334 pthread_mutex_unlock(&vstatlock);
335
>>> CID 454698: Incorrect expression (IDENTICAL_BRANCHES)
>>> The same code is executed regardless of whether "x_cvstat.aspect_width != 0 && x_cvstat.aspect_height != 0" is true, because the 'then' and 'else' branches are identical. Should one of the branches be modified, or the entire 'if' statement replaced?
336 if (x_cvstat.aspect_width != 0 && x_cvstat.aspect_height != 0) {
337 sh->min_aspect.x = sh->max_aspect.x = sh->min_width;
338 sh->min_aspect.y = sh->max_aspect.y = sh->min_height;
339 }
340 else {
341 sh->min_aspect.x = sh->max_aspect.x = sh->min_width;
** CID 454697: Program hangs (LOCK)
/tmp/sbbs-May-12-2023/src/conio/x_events.c: 565 in video_init()
________________________________________________________________________________________________________
*** CID 454697: Program hangs (LOCK)
/tmp/sbbs-May-12-2023/src/conio/x_events.c: 565 in video_init()
559 if (ciolib_initial_scaling != 0.0)
560 x_cvstat.scaling = vstat.scaling = ciolib_initial_scaling;
561 if (x_cvstat.scaling < 1.0 || vstat.scaling < 1.0)
562 x_cvstat.scaling = vstat.scaling = 1;
563 /* Initialize mode 3 (text, 80x25, 16 colors) */
564 if(load_vmode(&vstat, ciolib_initial_mode))
>>> CID 454697: Program hangs (LOCK)
>>> Returning without unlocking "vstatlock".
565 return(-1);
566 x_cvstat = vstat;
567 pthread_mutex_unlock(&vstatlock);
568 if(init_window())
569 return(-1);
570 bitmap_drv_init(x11_drawrect, x11_flush);
** CID 454696: Control flow issues (UNREACHABLE)
/tmp/sbbs-May-12-2023/src/conio/sdl_con.c: 346 in window_can_scale_internally()
________________________________________________________________________________________________________
*** CID 454696: Control flow issues (UNREACHABLE)
/tmp/sbbs-May-12-2023/src/conio/sdl_con.c: 346 in window_can_scale_internally()
340 {
341 double ival;
342 double fval = modf(vstat.scaling, &ival);
343
344 // TODO: Add toggle for software scaling
345 return true;
>>> CID 454696: Control flow issues (UNREACHABLE)
>>> This code cannot be reached: "if (fval == 0.)
return true;".
346 if (fval == 0.0)
347 return true;
348 return false;
349 }
350
351 static int sdl_init_mode(int mode, bool init)
________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50yp-2FP9gGRhvFklLaQKuBylUrkMFB3WMR2p7qIYKYTZrh4BbWTBf-2B-2Fi5ZUVF-2Fo-2B6flxo-3DX8P7_g4j7BHlu96plUOfCQsO0yRjoWZCZl8YGnZ-2FUtT39hrCo7meCvjTSwgjNWxh8U4aDHxfQHmMxsciENSIBRXp67uLEWOz8jwu3lZFR4uCjFHkbCONAY52JqWDBe66S35SQOx1f4wXv2LsZa7IQA5vCXFuyr8zmKHpG3m8Wuig8iyc7ux-2BQD0YVshzWBetWEqE7uzFZr9D2LkWv7T-2FSd8bmyg-3D-3D
--- SBBSecho 3.20-Linux
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
|