Fixed gcc-4.3.2 warnings with the warn_unused_result flag in some APIs

git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@2408 74dad513-b988-da41-8d7b-12977e46ad98
diff --git a/pjmedia/src/test/main.c b/pjmedia/src/test/main.c
index b041bca..4b22356 100644
--- a/pjmedia/src/test/main.c
+++ b/pjmedia/src/test/main.c
@@ -39,7 +39,8 @@
 
     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 c4a4e92..2a62520 100644
--- a/pjmedia/src/test/rtp_test.c
+++ b/pjmedia/src/test/rtp_test.c
@@ -32,7 +32,10 @@
 
     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;
 }