From e8292035968488eb3a9b61a431afc8c9a39f51d3 Mon Sep 17 00:00:00 2001 From: Benny Prijono Date: Thu, 1 Jan 2009 22:08:21 +0000 Subject: 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 --- pjsip-apps/src/samples/tonegen.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'pjsip-apps/src/samples/tonegen.c') diff --git a/pjsip-apps/src/samples/tonegen.c b/pjsip-apps/src/samples/tonegen.c index 4bd79e07..f0fc2f3f 100644 --- a/pjsip-apps/src/samples/tonegen.c +++ b/pjsip-apps/src/samples/tonegen.c @@ -127,8 +127,11 @@ int main() f = fopen("tonegen.pcm", "wb"); for (i=0; i<8000/SAMPLES_PER_FRAME; ++i) { + int count; pjmedia_port_get_frame(port, &frm); - fwrite(buf, SAMPLES_PER_FRAME, 2, f); + count = fwrite(buf, SAMPLES_PER_FRAME, 2, f); + if (count != 2) + break; } pj_assert(pjmedia_tonegen_is_busy(port) == 0); -- cgit v1.2.3