From c629cc5d79894ab29c55bcabacae59daf48df708 Mon Sep 17 00:00:00 2001 From: Luke Dashjr Date: Wed, 13 Jun 2012 16:58:38 +0000 Subject: [PATCH] Bugfix: Fix warnings when built without libudev support --- fpgautils.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/fpgautils.c b/fpgautils.c index 68753056..783015aa 100644 --- a/fpgautils.c +++ b/fpgautils.c @@ -36,10 +36,10 @@ #include "logging.h" #include "miner.h" +#ifdef HAVE_LIBUDEV char serial_autodetect_udev(detectone_func_t detectone, const char*prodname) { -#ifdef HAVE_LIBUDEV if (total_devices == MAX_DEVICES) return 0; @@ -72,10 +72,14 @@ serial_autodetect_udev(detectone_func_t detectone, const char*prodname) udev_unref(udev); return found; +} #else +char +serial_autodetect_udev(__maybe_unused detectone_func_t detectone, __maybe_unused const char*prodname) +{ return 0; -#endif } +#endif char serial_autodetect_devserial(detectone_func_t detectone, const char*prodname)