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 /pjmedia/src | |
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 'pjmedia/src')
-rw-r--r-- | pjmedia/src/test/main.c | 3 | ||||
-rw-r--r-- | pjmedia/src/test/rtp_test.c | 5 |
2 files changed, 6 insertions, 2 deletions
diff --git a/pjmedia/src/test/main.c b/pjmedia/src/test/main.c index b041bca9..4b223566 100644 --- a/pjmedia/src/test/main.c +++ b/pjmedia/src/test/main.c @@ -39,7 +39,8 @@ int main(int argc, char *argv[]) if (argc == 2 && argv[1][0]=='-' && argv[1][1]=='i') { puts("\nPress <ENTER> to quit"); - fgets(s, sizeof(s), stdin); + if (fgets(s, sizeof(s), stdin) == NULL) + return rc; } return rc; diff --git a/pjmedia/src/test/rtp_test.c b/pjmedia/src/test/rtp_test.c index c4a4e924..2a62520c 100644 --- a/pjmedia/src/test/rtp_test.c +++ b/pjmedia/src/test/rtp_test.c @@ -32,7 +32,10 @@ int rtp_test() pjmedia_rtp_session_init (&rtp, 4, 0x12345678); pjmedia_rtp_encode_rtp (&rtp, 4, 0, 0, 160, &rtphdr, &hdrlen); - fwrite (rtphdr, hdrlen, 1, fhnd); + if (fwrite (rtphdr, hdrlen, 1, fhnd) != 1) { + fclose(fhnd); + return -1; + } fclose(fhnd); return 0; } |