changeset 30729:fee897477e3b stable

build: Correctly build codebase when -DNDEBUG present (bug #62013) * lex.ll (make_integer_value): Remove call to sscanf from inside assert statement and place on its own line. Call assert() on new variable "status" which holds result of calling sscanf.
author Rik <rik@octave.org>
date Thu, 10 Feb 2022 15:29:44 -0800
parents bfff3d523690
children b476306bb7f9 fb0d6b1e0b64
files libinterp/parse-tree/lex.ll
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/parse-tree/lex.ll	Wed Feb 09 19:38:49 2022 +0100
+++ b/libinterp/parse-tree/lex.ll	Thu Feb 10 15:29:44 2022 -0800
@@ -3298,7 +3298,8 @@
     // are in deep doo doo.
 
     uintmax_t long_int_val;
-    assert (sscanf (yytxt.c_str (), "%jx", &long_int_val));
+    int status = sscanf (yytxt.c_str (), "%jx", &long_int_val);
+    assert (status);
 
     octave_value ov_value
       = make_integer_value (long_int_val, unsigned_val, bytes);