mate-desktop / mate-system-monitor

Process viewer and system resource monitor for MATE
https://mate-desktop.org
GNU General Public License v2.0
45 stars 27 forks source link

Fix conversion warnings #244

Closed rbuj closed 2 years ago

rbuj commented 2 years ago

Test

test.webm

msm_execute_helper.c:8:51: warning: implicit conversion changes signedness: 'int' to 'gsize' (aka 'unsigned long') [-Wsign-conversion]
    gchar **argv_modified = g_new0 (gchar *, argc + 1);
                            ~~~~~~~~~~~~~~~~~~~~~~^~~~
--
msm_execute_helper.c:9:34: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion]
    memcpy (argv_modified, argv, argc * sizeof (char*));
                                 ^~~~ ~
gsm_color_button.c:563:30: warning: implicit conversion turns floating-point number into integer: 'gdouble' (aka 'double') to 'guint16' (aka 'unsigned short') [-Wfloat-conversion]
    dropped[0] = priv->color.red;
               ~ ~~~~~~~~~~~~^~~
gsm_color_button.c:564:30: warning: implicit conversion turns floating-point number into integer: 'gdouble' (aka 'double') to 'guint16' (aka 'unsigned short') [-Wfloat-conversion]
    dropped[1] = priv->color.green;
               ~ ~~~~~~~~~~~~^~~~~
gsm_color_button.c:565:30: warning: implicit conversion turns floating-point number into integer: 'gdouble' (aka 'double') to 'guint16' (aka 'unsigned short') [-Wfloat-conversion]
    dropped[2] = priv->color.blue;
               ~ ~~~~~~~~~~~~^~~~
lukefromdc commented 2 years ago

Note that random errors where the color shows up as white are possible w master, though I only got that once. About to test this PR

raveit65 commented 2 years ago

Debian travis-ci build is boken in master after merging this https://app.travis-ci.com/github/mate-desktop/mate-system-monitor/jobs/580268165

lukefromdc commented 2 years ago

This job and the the one for mate-setting-daemon we got this warning just before the failure.

/usr/lib/python3.8/subprocess.py:848: RuntimeWarning: line buffering (buffering=1) isn't supported in binary mode, the default buffer size will be used

  self.stdout = io.open(c2pread, 'rb', bufsize)

!!! ERROR: run command [docker exec -t mate-system-monitor-debian-build /rootdir/build_scripts].

The command "./docker-build --name ${DISTRO} --verbose --config .build.yml --build scripts" exited with 1.

I have python 3.10 and no local build problems, but I don't know anythoing about working in containers etc and have no idea what this line buffering warning means or how to fix it-or even if its the cause of the error. Again, known good results in Debian testing. Wondering if the build script is the issue but no idea how to fix it.