mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-04 11:58:52 +00:00
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
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user