]> git.alsa-project.org Git - alsa-lib.git/commitdiff
Fixed C++ warnings
authorAbramo Bagnara <abramo@alsa-project.org>
Thu, 11 May 2000 14:12:34 +0000 (14:12 +0000)
committerAbramo Bagnara <abramo@alsa-project.org>
Thu, 11 May 2000 14:12:34 +0000 (14:12 +0000)
include/header.h
include/pcm.h

index 0d04fc1d527fdee26141a4051dd2629d418e44b7..52e2c9f0c98e7c74b9ee45d5649d1dd70d4e6bc9 100644 (file)
@@ -25,5 +25,6 @@
 #include <linux/asound.h>
 #include <linux/asequencer.h>
 #include <unistd.h>
+#include <stdlib.h>
 #include <fcntl.h>
 
index 53d84ee6e565bcd51f3bb641acae1829e888806a..57d2320964a37e9499a5e17d928e9eb0560b2bd3 100644 (file)
@@ -25,7 +25,7 @@ static inline size_t bitset_size(int nbits)
 
 static inline bitset_t *bitset_alloc(int nbits)
 {
-       return calloc(bitset_size(nbits), sizeof(bitset_t));
+       return (bitset_t*) calloc(bitset_size(nbits), sizeof(bitset_t));
 }
        
 static inline void bitset_set(bitset_t *bitmap, unsigned int pos)
@@ -76,7 +76,7 @@ static inline void bitset_one(bitset_t *dst, unsigned int nbits)
 {
        bitset_t *end = dst + bitset_size(nbits);
        while (dst < end)
-               *dst++ = -1;
+               *dst++ = ~(bitset_t)0;
 }
 
 typedef struct snd_pcm snd_pcm_t;