On Friday 15 April 2011 18:27:09 Romain Lalaut wrote:
>  Hi there,
> 
>  When I try to compile oss (svn trunk) with clang, I get this fatal
>  error :
> 
>  pcm.c:332:5: error: non-void function 'snd_pcm_close' should return a
>  value [-Wreturn-type]
>      return;
> 
>  Is it possible to fix it ?

I recall compiling OSS with clang some time ago. They must have added new 
warnings (OSS build uses -Werror by default). The fix should be trivial though. 
See attachment.

Yours,
        Yair K.
diff -r 09a210f84f55 lib/libsalsa/pcm.c
--- a/lib/libsalsa/pcm.c	Thu Jan 06 07:55:36 2011 +0200
+++ b/lib/libsalsa/pcm.c	Fri Apr 15 18:49:37 2011 +0300
@@ -329,7 +329,7 @@
 snd_pcm_close (snd_pcm_t * pcm)
 {
   if (pcm == NULL)
-    return;
+    return -1;
   close (pcm->fd);
   if (pcm->area != NULL)
     free (pcm->area);
_______________________________________________
oss-devel mailing list
oss-devel@mailman.opensound.com
http://mailman.opensound.com/mailman/listinfo/oss-devel

Reply via email to