diff options
author | Kevin P. Fleming <kpfleming@digium.com> | 2008-11-02 18:52:13 +0000 |
---|---|---|
committer | Kevin P. Fleming <kpfleming@digium.com> | 2008-11-02 18:52:13 +0000 |
commit | bd4eb070f3b292617be20bda069cac47df2f7495 (patch) | |
tree | a3750d996d41e35c5df34c29533dd7d9fdcaff24 /res/ael/ael.flex | |
parent | 1e6864dd9d894db29ebc350b015e9eb58226a021 (diff) |
bring over all the fixes for the warnings found by gcc 4.3.x from the 1.4 branch, and add the ones needed for all the new code here too
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@153616 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res/ael/ael.flex')
-rw-r--r-- | res/ael/ael.flex | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/res/ael/ael.flex b/res/ael/ael.flex index 64c96a649..4b29b5a6b 100644 --- a/res/ael/ael.flex +++ b/res/ael/ael.flex @@ -773,7 +773,9 @@ struct pval *ael2_parse(char *filename, int *errors) my_file = strdup(filename); stat(filename, &stats); buffer = (char*)malloc(stats.st_size+2); - fread(buffer, 1, stats.st_size, fin); + if (fread(buffer, 1, stats.st_size, fin) != stats.st_size) { + ast_log(LOG_ERROR, "fread() failed: %s\n", strerror(errno)); + } buffer[stats.st_size]=0; fclose(fin); @@ -841,7 +843,9 @@ static void setup_filestack(char *fnamebuf2, int fnamebuf_siz, glob_t *globbuf, struct stat stats; stat(fnamebuf2, &stats); buffer = (char*)malloc(stats.st_size+1); - fread(buffer, 1, stats.st_size, in1); + if (fread(buffer, 1, stats.st_size, in1) != stats.st_size) { + ast_log(LOG_ERROR, "fread() failed: %s\n", strerror(errno)); + } buffer[stats.st_size] = 0; ast_log(LOG_NOTICE," --Read in included file %s, %d chars\n",fnamebuf2, (int)stats.st_size); fclose(in1); |