1 Fix segmentation fault for release build mode
3 'int IAFBApi::callSync(...)' is missing a return
4 statement. When the sdk is compiled in release mode
5 executing this code results in a segmentation fault.
7 According to the C++ standard, a return statement is
8 required on a function that returns a non-void value.
9 Specifically: <<Flowing off the end of a function is
10 equivalent to a return with no value; this results in
11 undefined behaviour in a value-returning function.>>
13 The proposed fix provides the missing return statement
14 for IAFBApi's callSync method.
16 Upstream-Status: Pending
18 Signed-off-by: Raquel Medina <raquel.medina@konsulko.com>
20 diff --git a/platforms/agl/alexa-voiceagent-service/src/plugins/afb/AFBApiImpl.cpp b/platforms/agl/alexa-voiceagent-service/src/plugins/afb/AFBApiImpl.cpp
21 index 5ed9bce..e68ef7f 100644
22 --- a/src/plugins/afb/AFBApiImpl.cpp
23 +++ b/src/plugins/afb/AFBApiImpl.cpp
24 @@ -77,6 +77,8 @@ int AFBApiImpl::callSync(
32 /// Shim to transfer C++ function to C callback using void*