Commit dff190d7 authored by O H's avatar O H Committed by Simon Steinbeiß
Browse files

Fix va_args usage in get_device_icon_name

xfpm-power-common.c: In function 'get_device_icon_name':
xfpm-power-common.c:257:52: error: left-hand operand of comma expression has no effect [-Werror=unused-value]
  257 |     icon_name = g_strdup_printf (is_panel ? "%s-%s", XFPM_AC_ADAPTER_ICON, "-symbolic" : "%s", XFPM_AC_ADAPTER_ICON);
      |                                                    ^
xfpm-power-common.c:257:74: error: left-hand operand of comma expression has no effect [-Werror=unused-value]
  257 |     icon_name = g_strdup_printf (is_panel ? "%s-%s", XFPM_AC_ADAPTER_ICON, "-symbolic" : "%s", XFPM_AC_ADAPTER_ICON);
      |                                                                          ^
xfpm-power-common.c:269:52: error: left-hand operand of comma expression has no effect [-Werror=unused-value]
  269 |     icon_name = g_strdup_printf (is_panel ? "%s-%s", XFPM_AC_ADAPTER_ICON, "-symbolic" : "%s", XFPM_AC_ADAPTER_ICON);
      |                                                    ^
xfpm-power-common.c:269:74: error: left-hand operand of comma expression has no effect [-Werror=unused-value]
  269 |     icon_name = g_strdup_printf (is_panel ? "%s-%s", XFPM_AC_ADAPTER_ICON, "-symbolic" : "%s", XFPM_AC_ADAPTER_ICON);

Fixes commit b6d6bf8b
Fixes #103

Signed-off-by: O H's avatarOlaf Hering <olaf@aepfle.de>
parent 7acc5d9c
...@@ -254,7 +254,7 @@ get_device_icon_name (UpClient *upower, UpDevice *device, gboolean is_panel) ...@@ -254,7 +254,7 @@ get_device_icon_name (UpClient *upower, UpDevice *device, gboolean is_panel)
else if ( type == UP_DEVICE_KIND_MEDIA_PLAYER ) else if ( type == UP_DEVICE_KIND_MEDIA_PLAYER )
icon_name = g_strdup (XFPM_MEDIA_PLAYER_ICON); icon_name = g_strdup (XFPM_MEDIA_PLAYER_ICON);
else if ( type == UP_DEVICE_KIND_LINE_POWER ) else if ( type == UP_DEVICE_KIND_LINE_POWER )
icon_name = g_strdup_printf (is_panel ? "%s-%s", XFPM_AC_ADAPTER_ICON, "-symbolic" : "%s", XFPM_AC_ADAPTER_ICON); icon_name = g_strdup_printf ("%s%s", XFPM_AC_ADAPTER_ICON, is_panel ? "-symbolic" : "");
else if ( type == UP_DEVICE_KIND_MONITOR ) else if ( type == UP_DEVICE_KIND_MONITOR )
icon_name = g_strdup (XFPM_MONITOR_ICON); icon_name = g_strdup (XFPM_MONITOR_ICON);
else if ( type == UP_DEVICE_KIND_TABLET ) else if ( type == UP_DEVICE_KIND_TABLET )
...@@ -266,7 +266,7 @@ get_device_icon_name (UpClient *upower, UpDevice *device, gboolean is_panel) ...@@ -266,7 +266,7 @@ get_device_icon_name (UpClient *upower, UpDevice *device, gboolean is_panel)
else if (!up_client_get_lid_is_present (upower) && else if (!up_client_get_lid_is_present (upower) &&
!up_client_get_on_battery (upower) && !up_client_get_on_battery (upower) &&
g_strcmp0 (upower_icon, "battery-missing-symbolic") == 0) g_strcmp0 (upower_icon, "battery-missing-symbolic") == 0)
icon_name = g_strdup_printf (is_panel ? "%s-%s", XFPM_AC_ADAPTER_ICON, "-symbolic" : "%s", XFPM_AC_ADAPTER_ICON); icon_name = g_strdup_printf ("%s%s", XFPM_AC_ADAPTER_ICON, is_panel ? "-symbolic" : "");
else if ( g_strcmp0 (upower_icon, "") != 0 ) else if ( g_strcmp0 (upower_icon, "") != 0 )
icon_name = g_strndup (upower_icon, icon_base_length); icon_name = g_strndup (upower_icon, icon_base_length);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment