SHA256
1
0
forked from pool/audacity
audacity/audacity-no_return_in_nonvoid.patch
Dave Plater ba784ff25c Accepting request 883823 from home:plater
- Update to release 3.0.0 and add patch for wxWidgets test:
  audacity-remove-wx-test.patch
- Add another useless return after assert to:
  audacity-no_return_in_nonvoid.patch

OBS-URL: https://build.opensuse.org/request/show/883823
OBS-URL: https://build.opensuse.org/package/show/multimedia:apps/audacity?expand=0&rev=159
2021-04-08 11:04:57 +00:00

55 lines
2.2 KiB
Diff

Index: b/src/widgets/NumericTextCtrl.cpp
===================================================================
--- a/src/widgets/NumericTextCtrl.cpp 2021-03-09 12:19:38.000000000 +0200
+++ b/src/widgets/NumericTextCtrl.cpp 2021-04-08 10:00:19.126519391 +0200
@@ -677,6 +677,7 @@ static const BuiltinFormatString Bandwid
case NumericConverter::BANDWIDTH:
return WXSIZEOF(BandwidthConverterFormats_);
}
+ return WXSIZEOF(BandwidthConverterFormats_);
}
}
Index: b/lib-src/libnyquist/nyquist/xlisp/xlbfun.c
===================================================================
--- a/lib-src/libnyquist/nyquist/xlisp/xlbfun.c 2021-03-09 12:19:38.000000000 +0200
+++ b/lib-src/libnyquist/nyquist/xlisp/xlbfun.c 2021-04-08 10:00:19.174520965 +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' */
Index: b/lib-src/portsmf/allegro.cpp
===================================================================
--- a/lib-src/portsmf/allegro.cpp 2021-03-09 12:19:38.000000000 +0200
+++ b/lib-src/portsmf/allegro.cpp 2021-04-08 10:00:19.186521359 +0200
@@ -2885,6 +2885,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: b/lib-src/libnyquist/nyquist/cmupv/src/cmupv.c
===================================================================
--- a/lib-src/libnyquist/nyquist/cmupv/src/cmupv.c 2021-03-09 12:19:38.000000000 +0200
+++ b/lib-src/libnyquist/nyquist/cmupv/src/cmupv.c 2021-04-08 11:22:54.394897011 +0200
@@ -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);
}