mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/virt-viewer
synced 2026-01-27 03:19:01 +00:00
coverity: result is not floating-point
Coverity says: Result is not floating-point (UNINTENDED_INTEGER_DIVISION) interger_division: Dividing integer expressions "preferred->width * 100" and "zoom", and then converting the integer quotient to type double. Any remainder, or fractional part of the quotient, is ignored.
This commit is contained in:
parent
1782fdd050
commit
5001f2b1b1
@ -819,8 +819,8 @@ void virt_viewer_display_get_preferred_monitor_geometry(VirtViewerDisplay* self,
|
||||
if (virt_viewer_display_get_zoom(VIRT_VIEWER_DISPLAY(self))) {
|
||||
guint zoom = virt_viewer_display_get_zoom_level(VIRT_VIEWER_DISPLAY(self));
|
||||
|
||||
preferred->width = round(preferred->width * NORMAL_ZOOM_LEVEL / zoom);
|
||||
preferred->height = round(preferred->height * NORMAL_ZOOM_LEVEL / zoom);
|
||||
preferred->width = round(preferred->width * NORMAL_ZOOM_LEVEL / (double) zoom);
|
||||
preferred->height = round(preferred->height * NORMAL_ZOOM_LEVEL / (double) zoom);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user