mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-02 19:16:15 +00:00
BuildSystem: Fix a few issues hightlighted by gcc 6.x
gcc 6.1.1 caught a few more issues. Made sure the unit tests still pass for the func_env and stdtime issues. ASTERISK-26157 #close Change-Id: I6664d8f34a45bc1481d2a854481c7878b0c1cf8e
This commit is contained in:
@@ -624,7 +624,7 @@ static int file_read(struct ast_channel *chan, const char *cmd, char *data, stru
|
||||
ast_log(LOG_ERROR, "Cannot seek to offset %" PRId64 ": %s\n", i, strerror(errno));
|
||||
}
|
||||
end = fread(fbuf, 1, sizeof(fbuf), ff);
|
||||
for (pos = (end < sizeof(fbuf) ? fbuf + end - 1 : fbuf + sizeof(fbuf) - 1); pos > fbuf - 1; pos--) {
|
||||
for (pos = (end < sizeof(fbuf) ? fbuf + end - 1 : fbuf + sizeof(fbuf) - 1); pos >= fbuf; pos--) {
|
||||
LINE_COUNTER(pos, format, count);
|
||||
|
||||
if (length < 0 && count * -1 == length) {
|
||||
@@ -1024,7 +1024,7 @@ static int file_write(struct ast_channel *chan, const char *cmd, char *data, con
|
||||
fclose(ff);
|
||||
return -1;
|
||||
}
|
||||
for (pos = fbuf + sizeof(fbuf) - 1; pos > fbuf - 1; pos--) {
|
||||
for (pos = fbuf + sizeof(fbuf) - 1; pos >= fbuf; pos--) {
|
||||
LINE_COUNTER(pos, newline_format, count);
|
||||
|
||||
if (length < 0 && count * -1 == length) {
|
||||
|
Reference in New Issue
Block a user