mate-desktop / mate-settings-daemon

MATE settings daemon
https://mate-desktop.org
GNU General Public License v2.0
44 stars 46 forks source link

media-keys: Remove conversion warnings #365

Closed rbuj closed 3 years ago

rbuj commented 3 years ago
msd-media-keys-manager.c: In function ‘update_dialog’:
msd-media-keys-manager.c:680:49: warning: conversion to ‘int’ from ‘guint’ {aka ‘unsigned int’} may change the sign of the result [-Wsign-conversion]
  680 |                                                 volume);
      |                                                 ^~~~~~
msd-media-keys-manager.c: In function ‘do_sound_action’:
msd-media-keys-manager.c:726:23: warning: conversion to ‘guint’ {aka ‘unsigned int’} from ‘gint’ {aka ‘int’} may change the sign of the result [-Wsign-conversion]
  726 |         volume_step = g_settings_get_int (manager->priv->settings, "volume-step");
      |                       ^~~~~~~~~~~~~~~~~~
msd-media-keys-manager.c:729:31: warning: conversion to ‘guint’ {aka ‘unsigned int’} from ‘gint32’ {aka ‘int’} may change the sign of the result [-Wsign-conversion]
  729 |                 volume_step = g_variant_get_int32 (variant);
      |                               ^~~~~~~~~~~~~~~~~~~
msd-media-keys-window.c: In function ‘msd_media_keys_window_set_volume_muted’:
msd-media-keys-window.c:226:46: warning: conversion from ‘gboolean’ {aka ‘int’} to ‘unsigned char:1’ may change value [-Wconversion]
  226 |                 window->priv->volume_muted = muted;
      |                                              ^~~~~
msd-media-keys-window.c: In function ‘msd_media_keys_window_set_mic_muted’:
msd-media-keys-window.c:239:43: warning: conversion from ‘gboolean’ {aka ‘int’} to ‘unsigned char:1’ may change value [-Wconversion]
  239 |                 window->priv->mic_muted = muted;
      |                                           ^~~~~
msd-media-keys-window.c: In function ‘draw_eject’:
msd-media-keys-window.c:291:22: warning: conversion from ‘double’ to ‘int’ may change value [-Wfloat-conversion]
  291 |         box_height = height * 0.2;
      |                      ^~~~~~
msd-media-keys-window.c:293:22: warning: conversion from ‘double’ to ‘int’ may change value [-Wfloat-conversion]
  293 |         tri_height = height - box_height - separation;
      |                      ^~~~~~
msd-media-keys-window.c: In function ‘msd_media_keys_window_set_volume_muted’:
msd-media-keys-window.c:226:46: warning: conversion from ‘gboolean’ {aka ‘int’} to ‘unsigned char:1’ may change value [-Wconversion]
  226 |                 window->priv->volume_muted = muted;
      |                                              ^~~~~
msd-media-keys-window.c: In function ‘msd_media_keys_window_set_mic_muted’:
msd-media-keys-window.c:239:43: warning: conversion from ‘gboolean’ {aka ‘int’} to ‘unsigned char:1’ may change value [-Wconversion]
  239 |                 window->priv->mic_muted = muted;
      |                                           ^~~~~
msd-media-keys-window.c: In function ‘draw_eject’:
msd-media-keys-window.c:291:22: warning: conversion from ‘double’ to ‘int’ may change value [-Wfloat-conversion]
  291 |         box_height = height * 0.2;
      |                      ^~~~~~
msd-media-keys-window.c:293:22: warning: conversion from ‘double’ to ‘int’ may change value [-Wfloat-conversion]
  293 |         tri_height = height - box_height - separation;
      |                      ^~~~~~
msd-media-keys-manager.c: In function ‘update_dialog’:
msd-media-keys-manager.c:680:49: warning: conversion to ‘int’ from ‘guint’ {aka ‘unsigned int’} may change the sign of the result [-Wsign-conversion]
  680 |                                                 volume);
      |                                                 ^~~~~~
msd-media-keys-manager.c: In function ‘do_sound_action’:
msd-media-keys-manager.c:726:23: warning: conversion to ‘guint’ {aka ‘unsigned int’} from ‘gint’ {aka ‘int’} may change the sign of the result [-Wsign-conversion]
  726 |         volume_step = g_settings_get_int (manager->priv->settings, "volume-step");
      |                       ^~~~~~~~~~~~~~~~~~
msd-media-keys-manager.c:729:31: warning: conversion to ‘guint’ {aka ‘unsigned int’} from ‘gint32’ {aka ‘int’} may change the sign of the result [-Wsign-conversion]
  729 |                 volume_step = g_variant_get_int32 (variant);
      |                               ^~~~~~~~~~~~~~~~~~~
msd-media-keys-window.c: In function ‘msd_media_keys_window_set_volume_muted’:
msd-media-keys-window.c:226:46: warning: conversion from ‘gboolean’ {aka ‘int’} to ‘unsigned char:1’ may change value [-Wconversion]
  226 |                 window->priv->volume_muted = muted;
      |                                              ^~~~~
msd-media-keys-window.c: In function ‘msd_media_keys_window_set_mic_muted’:
msd-media-keys-window.c:239:43: warning: conversion from ‘gboolean’ {aka ‘int’} to ‘unsigned char:1’ may change value [-Wconversion]
  239 |                 window->priv->mic_muted = muted;
      |                                           ^~~~~
msd-media-keys-window.c: In function ‘draw_eject’:
msd-media-keys-window.c:291:22: warning: conversion from ‘double’ to ‘int’ may change value [-Wfloat-conversion]
  291 |         box_height = height * 0.2;
      |                      ^~~~~~
msd-media-keys-window.c:293:22: warning: conversion from ‘double’ to ‘int’ may change value [-Wfloat-conversion]
  293 |         tri_height = height - box_height - separation;
      |                      ^~~~~~