import gcc 4.3.2 warning fixes from trunk, with a few changes specific to this branch

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@153710 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Kevin P. Fleming
2008-11-02 23:56:13 +00:00
parent bdb5cf6f46
commit 1036849a42
50 changed files with 991 additions and 504 deletions

View File

@@ -2273,8 +2273,11 @@ int ast_waitfordigit_full(struct ast_channel *c, int ms, int audiofd, int cmdfd)
break;
case AST_FRAME_VOICE:
/* Write audio if appropriate */
if (audiofd > -1)
write(audiofd, f->data.ptr, f->datalen);
if (audiofd > -1) {
if (write(audiofd, f->data.ptr, f->datalen) < 0) {
ast_log(LOG_WARNING, "write() failed: %s\n", strerror(errno));
}
}
default:
/* Ignore */
break;
@@ -2421,7 +2424,9 @@ static struct ast_frame *__ast_read(struct ast_channel *chan, int dropaudio)
goto done;
}
}
read(chan->alertpipe[0], &blah, sizeof(blah));
if (read(chan->alertpipe[0], &blah, sizeof(blah)) < 0) {
ast_log(LOG_WARNING, "read() failed: %s\n", strerror(errno));
}
}
if (chan->timingfd > -1 && chan->fdno == AST_TIMING_FD) {
@@ -3888,7 +3893,10 @@ int ast_do_masquerade(struct ast_channel *original)
AST_LIST_INSERT_TAIL(&original->readq, current, frame_list);
if (original->alertpipe[1] > -1) {
int poke = 0;
write(original->alertpipe[1], &poke, sizeof(poke));
if (write(original->alertpipe[1], &poke, sizeof(poke)) < 0) {
ast_log(LOG_WARNING, "write() failed: %s\n", strerror(errno));
}
}
}
}