diff options
author | Benny Prijono <bennylp@teluu.com> | 2009-01-01 22:08:21 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2009-01-01 22:08:21 +0000 |
commit | e8292035968488eb3a9b61a431afc8c9a39f51d3 (patch) | |
tree | 37b6e83a23282b53ed0ab8a602498798bb56c57d /pjsip-apps/src/samples/siprtp.c | |
parent | 423bd3b19d5611412da90b87f6989dc89339defa (diff) |
Fixed gcc-4.3.2 warnings with the warn_unused_result flag in some APIs
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@2408 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip-apps/src/samples/siprtp.c')
-rw-r--r-- | pjsip-apps/src/samples/siprtp.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/pjsip-apps/src/samples/siprtp.c b/pjsip-apps/src/samples/siprtp.c index e98084bc..b3e3d7d4 100644 --- a/pjsip-apps/src/samples/siprtp.c +++ b/pjsip-apps/src/samples/siprtp.c @@ -1862,7 +1862,8 @@ static pj_bool_t simple_input(const char *title, char *buf, pj_size_t len) char *p; printf("%s (empty to cancel): ", title); fflush(stdout); - fgets(buf, len, stdin); + if (fgets(buf, len, stdin) == NULL) + return PJ_FALSE; /* Remove trailing newlines. */ for (p=buf; ; ++p) { @@ -1898,7 +1899,10 @@ static void console_main() for (;;) { printf(">>> "); fflush(stdout); - fgets(input1, sizeof(input1), stdin); + if (fgets(input1, sizeof(input1), stdin) == NULL) { + puts("EOF while reading stdin, will quit now.."); + break; + } switch (input1[0]) { @@ -2020,7 +2024,8 @@ static void app_log_writer(int level, const char *buffer, int len) pj_log_write(level, buffer, len); if (log_file) { - fwrite(buffer, len, 1, log_file); + int count = fwrite(buffer, len, 1, log_file); + PJ_UNUSED_ARG(count); fflush(log_file); } } |