mirror of
https://github.com/TREX-CoE/qmckl.git
synced 2024-12-22 20:36:01 +01:00
Remove annoying warning in debug
This commit is contained in:
parent
7ea06ffcce
commit
acb034e88b
@ -456,8 +456,19 @@ qmckl_get_error(qmckl_context context,
|
||||
qmckl_context_struct* const ctx = (qmckl_context_struct* const) context;
|
||||
assert (ctx != NULL); /* Impossible because the context is valid. */
|
||||
|
||||
/* Turn off annoying GCC warning */
|
||||
#ifdef __GNUC__
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wstringop-truncation"
|
||||
#endif
|
||||
|
||||
strncpy(function_name, ctx->error.function, QMCKL_MAX_FUN_LEN-1);
|
||||
strncpy(message , ctx->error.message , QMCKL_MAX_MSG_LEN-1);
|
||||
|
||||
#ifdef __GNUC__
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
(*exit_code) = ctx->error.exit_code;
|
||||
}
|
||||
qmckl_unlock(context);
|
||||
|
Loading…
Reference in New Issue
Block a user