audacity/audacity-no_return_in_nonvoid.patch

55 lines
2.3 KiB
Diff

Index: audacity-Audacity-3.1.3-beta-1/src/widgets/NumericTextCtrl.cpp
===================================================================
--- audacity-Audacity-3.1.3-beta-1.orig/src/widgets/NumericTextCtrl.cpp
+++ audacity-Audacity-3.1.3-beta-1/src/widgets/NumericTextCtrl.cpp
@@ -679,6 +679,7 @@ static const BuiltinFormatString Bandwid
case NumericConverter::BANDWIDTH:
return WXSIZEOF(BandwidthConverterFormats_);
}
+ return WXSIZEOF(BandwidthConverterFormats_);
}
}
Index: audacity-Audacity-3.1.3-beta-1/lib-src/libnyquist/nyquist/xlisp/xlbfun.c
===================================================================
--- audacity-Audacity-3.1.3-beta-1.orig/lib-src/libnyquist/nyquist/xlisp/xlbfun.c
+++ audacity-Audacity-3.1.3-beta-1/lib-src/libnyquist/nyquist/xlisp/xlbfun.c
@@ -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' */
Index: audacity-Audacity-3.1.3-beta-1/lib-src/portsmf/allegro.cpp
===================================================================
--- audacity-Audacity-3.1.3-beta-1.orig/lib-src/portsmf/allegro.cpp
+++ audacity-Audacity-3.1.3-beta-1/lib-src/portsmf/allegro.cpp
@@ -2905,6 +2905,9 @@ Alg_event_ptr &Alg_seq::operator[](int i
tr++;
}
assert(false); // out of bounds
+ Alg_event_ptr ab_track;
+ return ab_track; // Fix false positive error: control reaches end of non-void function [-Werror=return-type]
+ // Ignores the assert A gcc bug?
}
#pragma warning(default: 4715)
Index: audacity-Audacity-3.1.3-beta-1/lib-src/libnyquist/nyquist/cmupv/src/cmupv.c
===================================================================
--- audacity-Audacity-3.1.3-beta-1.orig/lib-src/libnyquist/nyquist/cmupv/src/cmupv.c
+++ audacity-Audacity-3.1.3-beta-1/lib-src/libnyquist/nyquist/cmupv/src/cmupv.c
@@ -600,6 +600,7 @@ double pv_get_effective_pos(Phase_vocode
return -(pv->ratio * pv->fftsize / 2.0);
} // I can't think of any other case.
assert(FALSE);
+ return(0);
}