WaE: C6011 Dereferencing NULL pointer warnings

Change-Id: Ibca9433761e7a7f97383991429cf0d575b4ba3d8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167018
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
This commit is contained in:
Caolán McNamara 2024-05-02 15:27:44 +01:00
parent 5edaca5c89
commit 3cc6384e41
2 changed files with 3 additions and 1 deletions

View file

@ -580,6 +580,7 @@ void Formula::parse()
}
char *buf = static_cast<char *>(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<char *>(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

View file

@ -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.