diff --git a/hwpfilter/source/formula.cxx b/hwpfilter/source/formula.cxx index e220afe9d881..84982dcd9aae 100644 --- a/hwpfilter/source/formula.cxx +++ b/hwpfilter/source/formula.cxx @@ -580,6 +580,7 @@ void Formula::parse() } char *buf = static_cast(malloc(a.getLength()+1)); + assert(buf && "Don't handle OOM conditions"); bool bStart = false; int i, j; for( i = 0, j=0 ; i < a.getLength() ; i++){ // rtrim and ltrim 32 10 13 @@ -618,6 +619,7 @@ void Formula::trim() { int len = strlen(eq); char *buf = static_cast(malloc(len+1)); + assert(buf && "Don't handle OOM conditions"); bool bStart = false; int i, j; for( i = 0, j=0 ; i < len ; i++){ // rtrim and ltrim 32 10 13 diff --git a/hwpfilter/source/lexer.cxx b/hwpfilter/source/lexer.cxx index cb6ae3fc4b49..844432268d92 100644 --- a/hwpfilter/source/lexer.cxx +++ b/hwpfilter/source/lexer.cxx @@ -220,7 +220,7 @@ typedef int yy_state_type; static yy_state_type yy_get_previous_state YY_PROTO(( )); static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state )); static int yy_get_next_buffer YY_PROTO(( )); -static void yy_fatal_error YY_PROTO(( yyconst char msg[] )); +[[noreturn]] static void yy_fatal_error YY_PROTO(( yyconst char msg[] )); /* Done after the current pattern has been matched and before the * corresponding action - sets up yytext.