diff --git a/src/examples/ekf_att_pos_estimator/estimator_utilities.cpp b/src/examples/ekf_att_pos_estimator/estimator_utilities.cpp index 13ba3b205a..a8c09f11f5 100644 --- a/src/examples/ekf_att_pos_estimator/estimator_utilities.cpp +++ b/src/examples/ekf_att_pos_estimator/estimator_utilities.cpp @@ -64,6 +64,7 @@ ekf_debug(const char *fmt, ...) va_start(args, fmt); ekf_debug_print(fmt, args); + va_end(args); } #else diff --git a/src/modules/fw_pos_control_l1/mtecs/mTecs.cpp b/src/modules/fw_pos_control_l1/mtecs/mTecs.cpp index 333d8a5b8f..fdd5ca04d4 100644 --- a/src/modules/fw_pos_control_l1/mtecs/mTecs.cpp +++ b/src/modules/fw_pos_control_l1/mtecs/mTecs.cpp @@ -336,6 +336,7 @@ void mTecs::debug(const char *fmt, ...) va_start(args, fmt); debug_print(fmt, args); + va_end(args); } } /* namespace fwPosctrl */ diff --git a/src/modules/systemlib/err.c b/src/modules/systemlib/err.c index 0b78dbb49d..2aa6f4634a 100644 --- a/src/modules/systemlib/err.c +++ b/src/modules/systemlib/err.c @@ -102,7 +102,9 @@ err(int exitcode, const char *fmt, ...) va_list args; va_start(args, fmt); - verr(exitcode, fmt, args); + warnerr_core(errno, fmt, args); + va_end(args); + exit(exitcode); } void @@ -118,7 +120,9 @@ errc(int exitcode, int errcode, const char *fmt, ...) va_list args; va_start(args, fmt); - verrc(exitcode, errcode, fmt, args); + warnerr_core(errcode, fmt, args); + va_end(args); + exit(exitcode); } void @@ -134,7 +138,9 @@ errx(int exitcode, const char *fmt, ...) va_list args; va_start(args, fmt); - verrx(exitcode, fmt, args); + warnerr_core(NOCODE, fmt, args); + va_end(args); + exit(exitcode); } void diff --git a/src/platforms/qurt/px4_layer/px4_qurt_impl.cpp b/src/platforms/qurt/px4_layer/px4_qurt_impl.cpp index d9e0f7842c..6d9054e031 100644 --- a/src/platforms/qurt/px4_layer/px4_qurt_impl.cpp +++ b/src/platforms/qurt/px4_layer/px4_qurt_impl.cpp @@ -80,6 +80,7 @@ void qurt_log(const char *fmt, ...) va_start(args, fmt); printf(fmt, args); printf("n"); + va_end(args); } #endif