File audacity-no_return_in_nonvoid.patch of Package audacity

Index: src/widgets/NumericTextCtrl.cpp
===================================================================
--- src/widgets/NumericTextCtrl.cpp.orig	2018-02-14 09:11:20.000000000 +0200
+++ src/widgets/NumericTextCtrl.cpp	2018-02-22 11:55:52.378391120 +0200
@@ -604,6 +604,7 @@ return theArray.Get();
          case NumericConverter::BANDWIDTH:
             return BandwidthConverterFormats();
       }
+   return std::vector<BuiltinFormatString> {};
    }
 }
 
Index: lib-src/libnyquist/nyquist/xlisp/xlbfun.c
===================================================================
--- lib-src/libnyquist/nyquist/xlisp/xlbfun.c.orig	2018-02-14 09:11:20.000000000 +0200
+++ lib-src/libnyquist/nyquist/xlisp/xlbfun.c	2018-02-22 12:03:14.405777878 +0200
@@ -603,7 +603,10 @@ LVAL xcleanup(void)
 {
     xllastarg();
     xlcleanup();
-    /* compiler might (wrongly) complain there is no return value */
+    /* this point will never be reached because xlcleanup() does a
+    longjmp(). The return is added to avoid false positive
+    error messages from static analyzers and compilers */
+    return (NIL);
 }
 
 /* xtoplevel - special form 'top-level' */
openSUSE Build Service is sponsored by