File audacity-no_return_in_nonvoid.patch of Package audacity

Index: audacity-Audacity-2.2.2/src/widgets/NumericTextCtrl.cpp
===================================================================
--- audacity-Audacity-2.2.2.orig/src/widgets/NumericTextCtrl.cpp	2020-12-03 13:13:41.953400621 +0200
+++ audacity-Audacity-2.2.2/src/widgets/NumericTextCtrl.cpp	2020-12-03 13:14:07.614368492 +0200
@@ -604,6 +604,7 @@ return theArray.Get();
          case NumericConverter::BANDWIDTH:
             return BandwidthConverterFormats();
       }
+   return std::vector<BuiltinFormatString> {};
    }
 }
 
Index: audacity-Audacity-2.2.2/lib-src/libnyquist/nyquist/xlisp/xlbfun.c
===================================================================
--- audacity-Audacity-2.2.2.orig/lib-src/libnyquist/nyquist/xlisp/xlbfun.c	2020-12-03 13:13:41.953400621 +0200
+++ audacity-Audacity-2.2.2/lib-src/libnyquist/nyquist/xlisp/xlbfun.c	2020-12-03 13:14:07.614368492 +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