clang errors out about an unused have_busybox function:
discover/paths.c:44:13: error: unused function 'have_busybox' [-Werror,-Wunused-function]
static bool have_busybox(void)
^
Move have_busybox() to inside the #ifndef PETITBOOT_TEST scope to
eliminate the warning and avoid having #ifdefs in load_url_async().
Signed-off-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
[Moved definition into #ifndef PETITBOOT_TEST instead of using
#ifdef at the call site]
void *async_data;
};
-static inline bool have_busybox(void)
-{
-#ifdef WITH_BUSYBOX
- return true;
-#else
- return false;
-#endif
-}
-
const char *mount_base(void)
{
return DEVICE_MOUNT_BASE;
#ifndef PETITBOOT_TEST
+#ifdef WITH_BUSYBOX
+static inline bool have_busybox(void) { return true; }
+#else
+static inline bool have_busybox(void) { return false; }
+#endif
+
static char *local_name(void *ctx)
{
char *ret, tmp[] = "/tmp/pb-XXXXXX";