mate-desktop / mate-screensaver

MATE screen saver and locker
https://mate-desktop.org
GNU General Public License v2.0
48 stars 40 forks source link

Fix some -Wshorten-64-to-32 warnings #268

Closed rbuj closed 2 years ago

rbuj commented 2 years ago
CFLAGS="-Wconversion -Wunused-macros -Wunused-parameter" CC=clang ./autogen.sh --prefix=/usr --enable-debug --enable-compile-warnings=maximum && make &> make.log
gs-lock-plug.c:1733:12: warning: implicit conversion loses integer precision: 'glong' (aka 'long') to 'int' [-Wshorten-64-to-32]
gs-watcher-x11.c:94:52: warning: implicit conversion loses integer precision: 'glong' (aka 'long') to 'guint' (aka 'unsigned int') [-Wshorten-64-to-32]
gs-window-x11.c:620:51: warning: implicit conversion loses integer precision: 'glong' (aka 'long') to 'guint' (aka 'unsigned int') [-Wshorten-64-to-32]
xdg-user-dir-lookup.c:74:9: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32]
raveit65 commented 2 years ago

Description is missing. It would be nice that you post the warnings which you want to fix. Because i don't get them in my normal build or in debian build of travis. This will make it easier for an reviewer who like to start with an review.

rbuj commented 2 years ago

I'll recompile it and I'll list the fixed warnings on the PR description after doing a git rebase master.

rbuj commented 2 years ago

@raveit65 done

raveit65 commented 2 years ago

Thanks, i can confirm that PR fixes the warnings, comparing 2 local builds.