From 6b5926ca593f79c58301c03f11276eff6cda3255 Mon Sep 17 00:00:00 2001 From: Richard Hughes Date: Thu, 24 Sep 2020 09:19:15 +0100 Subject: [PATCH] trivial: Fix two warnings in the win32 build --- libfwupdplugin/fu-efivar.c | 10 ++-------- libfwupdplugin/fu-udev-device.c | 4 ++-- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/libfwupdplugin/fu-efivar.c b/libfwupdplugin/fu-efivar.c index 0bde17fd6..e976ee202 100644 --- a/libfwupdplugin/fu-efivar.c +++ b/libfwupdplugin/fu-efivar.c @@ -69,13 +69,13 @@ fu_efivar_supported (GError **error) #endif } +#ifndef _WIN32 static gboolean fu_efivar_set_immutable_fd (int fd, gboolean value, gboolean *value_old, GError **error) { -#ifndef _WIN32 guint flags; gboolean is_immutable; int rc; @@ -124,14 +124,8 @@ fu_efivar_set_immutable_fd (int fd, return FALSE; } return TRUE; -#else - g_set_error_literal (error, - FWUPD_ERROR, - FWUPD_ERROR_NOT_SUPPORTED, - "efivarfs not currently supported on Windows"); - return FALSE; -#endif } +#endif static gboolean fu_efivar_set_immutable (const gchar *fn, diff --git a/libfwupdplugin/fu-udev-device.c b/libfwupdplugin/fu-udev-device.c index 631faa1d9..c66672ba6 100644 --- a/libfwupdplugin/fu-udev-device.c +++ b/libfwupdplugin/fu-udev-device.c @@ -195,10 +195,10 @@ fu_udev_device_set_device_file (FuUdevDevice *self, const gchar *device_file) g_object_notify (G_OBJECT (self), "device-file"); } +#ifdef HAVE_GUDEV static const gchar * fu_udev_device_get_vendor_fallback (GUdevDevice *udev_device) { -#ifdef HAVE_GUDEV const gchar *tmp; tmp = g_udev_device_get_property (udev_device, "ID_VENDOR_FROM_DATABASE"); if (tmp != NULL) @@ -206,9 +206,9 @@ fu_udev_device_get_vendor_fallback (GUdevDevice *udev_device) tmp = g_udev_device_get_property (udev_device, "ID_VENDOR"); if (tmp != NULL) return tmp; -#endif return NULL; } +#endif #ifdef HAVE_GUDEV static gboolean