]> git.alsa-project.org Git - alsa-lib.git/commitdiff
'make check' fails on a Slackware 8.1 system with gcc-2.95.3 due to three
authorJaroslav Kysela <perex@perex.cz>
Tue, 27 Jan 2004 19:49:48 +0000 (19:49 +0000)
committerJaroslav Kysela <perex@perex.cz>
Tue, 27 Jan 2004 19:49:48 +0000 (19:49 +0000)
minor problems (one missing #define/#include statement, two misplaced
variable delarations) in test/code.c and test/queue_timer.c.

test/code.c
test/queue_timer.c

index 9b4773cb880bfabaf56e9d080ddd59f9ec4c7ca7..2f460a483a56463591ebf05f2082d03aca8f2e2f 100644 (file)
@@ -5,6 +5,10 @@
 #include <sched.h>
 #include <sys/time.h>
 
+#ifndef __builtin_expect
+#include <linux/compiler.h>
+#endif
+
 #define rdtscll(val) \
      __asm__ __volatile__("rdtsc" : "=A" (val))
 
@@ -212,6 +216,9 @@ int main(int argc, char **argv)
        int i, t;
        unsigned long long begin, end, diff, diffS, diff0, diff1, diff1_mmx, diff2;
         double cpu_clock = detect_cpu_clock();
+       s16 *dst = malloc(sizeof(*dst) * size);
+       s32 *sum = calloc(size, sizeof(*sum));
+       s16 **srcs = malloc(sizeof(*srcs) * n);
 
        setscheduler();
 #ifndef CONFIG_SMP
@@ -226,9 +233,6 @@ int main(int argc, char **argv)
        }
        if (argc > 4)
                cache_size = atoi(argv[4]) * 1024;
-       s16 *dst = malloc(sizeof(*dst) * size);
-       s32 *sum = calloc(size, sizeof(*sum));
-       s16 **srcs = malloc(sizeof(*srcs) * n);
        for (i = 0; i < n; i++) {
                int k;
                s16 *s;
index 742756f4e2a94927182d00f5c9558b27e231e5b2..cca0132556c8bcc1e3b27edf70beb42ee2d26cc8 100644 (file)
@@ -74,6 +74,7 @@ main(int argc, char **argv)
        snd_seq_queue_status_t *status;
        const snd_seq_real_time_t *rtime;
        struct timeval tv, diff, diffdiff;
+       struct timespec ts;
 
        snd_seq_queue_status_alloca(&status);
 
@@ -115,7 +116,6 @@ main(int argc, char **argv)
 
        fprintf(stderr, "\n");
 //     sleep(1);
-       struct timespec ts;
        ts.tv_sec = 0;
        ts.tv_nsec = 500000000;
        nanosleep(&ts, 0);