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:
@@ -580,6 +580,7 @@ void Formula::parse()
|
|||||||
}
|
}
|
||||||
|
|
||||||
char *buf = static_cast<char *>(malloc(a.getLength()+1));
|
char *buf = static_cast<char *>(malloc(a.getLength()+1));
|
||||||
|
assert(buf && "Don't handle OOM conditions");
|
||||||
bool bStart = false;
|
bool bStart = false;
|
||||||
int i, j;
|
int i, j;
|
||||||
for( i = 0, j=0 ; i < a.getLength() ; i++){ // rtrim and ltrim 32 10 13
|
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);
|
int len = strlen(eq);
|
||||||
char *buf = static_cast<char *>(malloc(len+1));
|
char *buf = static_cast<char *>(malloc(len+1));
|
||||||
|
assert(buf && "Don't handle OOM conditions");
|
||||||
bool bStart = false;
|
bool bStart = false;
|
||||||
int i, j;
|
int i, j;
|
||||||
for( i = 0, j=0 ; i < len ; i++){ // rtrim and ltrim 32 10 13
|
for( i = 0, j=0 ; i < len ; i++){ // rtrim and ltrim 32 10 13
|
||||||
|
@@ -220,7 +220,7 @@ typedef int yy_state_type;
|
|||||||
static yy_state_type yy_get_previous_state YY_PROTO(( ));
|
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 yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
|
||||||
static int yy_get_next_buffer YY_PROTO(( ));
|
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
|
/* Done after the current pattern has been matched and before the
|
||||||
* corresponding action - sets up yytext.
|
* corresponding action - sets up yytext.
|
||||||
|
Reference in New Issue
Block a user