Remove build type hardcode spec.
Also add QPMS_NORETURN attribute/macro. TODO cherry-pick this Former-commit-id: 1e5b9ae308ce958f6970ddc343d22ed5f8e5661c
This commit is contained in:
parent
acec5bed98
commit
e3834fdad7
|
@ -5,8 +5,6 @@ include(GNUInstallDirs)
|
|||
|
||||
project (QPMS)
|
||||
|
||||
set(CMAKE_BUILD_TYPE Debug)
|
||||
|
||||
macro(use_c99)
|
||||
if (CMAKE_VERSION VERSION_LESS "3.1")
|
||||
if (CMAKE_C_COMPILER_ID STREQUAL "GNU")
|
||||
|
|
|
@ -19,4 +19,10 @@
|
|||
#define QPMS_EXPECT(exp,c) (exp)
|
||||
#endif
|
||||
|
||||
#if (defined(__GNUC__) && __GNUC__ >= 3) || \
|
||||
(defined(__GNUC__) && defined(__GNUC_MINOR__) && __GNUC__ == 2 && __GNUC_MINOR__ >= 8)
|
||||
// TODO clang
|
||||
#define QPMS_NORETURN __attribute__((noreturn))
|
||||
#endif
|
||||
|
||||
#endif // OPTIM_H
|
||||
|
|
|
@ -4,14 +4,14 @@
|
|||
#include "optim.h"
|
||||
|
||||
/// Provisional error message with abort();
|
||||
void qpms_pr_error(const char *fmt, ...);
|
||||
QPMS_NORETURN void qpms_pr_error(const char *fmt, ...);
|
||||
//void qpms_error(const char *fmt, ...);
|
||||
|
||||
/// Provisional error message with abort(), indicating source and line number.
|
||||
void qpms_pr_error_at_line(const char *filename, unsigned int linenum,
|
||||
const char *fmt, ...);
|
||||
|
||||
void qpms_pr_error_at_flf(const char *filename, unsigned int linenum,
|
||||
QPMS_NORETURN void qpms_pr_error_at_flf(const char *filename, unsigned int linenum,
|
||||
const char *func,
|
||||
const char *fmt, ...);
|
||||
|
||||
|
|
|
@ -429,12 +429,12 @@ qpms_errno_t qpms_read_scuff_tmatrix(
|
|||
switch(PAlpha) {
|
||||
case 0: TAlpha = QPMS_VSWF_MAGNETIC; break;
|
||||
case 1: TAlpha = QPMS_VSWF_ELECTRIC; break;
|
||||
default: assert(0);
|
||||
default: QPMS_WTF;
|
||||
}
|
||||
switch(PBeta) {
|
||||
case 0: TBeta = QPMS_VSWF_MAGNETIC; break;
|
||||
case 1: TBeta = QPMS_VSWF_ELECTRIC; break;
|
||||
default: assert(0);
|
||||
default: QPMS_WTF;
|
||||
}
|
||||
qpms_uvswfi_t srcui = qpms_tmn2uvswfi(TAlpha, MAlpha, LAlpha),
|
||||
destui = qpms_tmn2uvswfi(TBeta, MBeta, LBeta);
|
||||
|
|
Loading…
Reference in New Issue