]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
mips32: finetune vfp test to avoid compiler warnings
authorPetar Jovanovic <mips32r2@gmail.com>
Thu, 17 Aug 2017 18:08:17 +0000 (20:08 +0200)
committerPetar Jovanovic <mips32r2@gmail.com>
Thu, 17 Aug 2017 18:08:17 +0000 (20:08 +0200)
This patch removes two compiler warnings from the test:

vfp.c: In function 'handler':
vfp.c:260:4: warning: implicit declaration of function 'exit'
[-Wimplicit-function-declaration]
    exit(0);
    ^
vfp.c:260:4: warning: incompatible implicit declaration of built-in
function 'exit'
vfp.c: At top level:
vfp.c:258:13: warning: 'handler' defined but not used [-Wunused-function]
 static void handler(int sig)
             ^

none/tests/mips32/vfp.c

index 9412457bc18ff75cb156fa590916a73fbc8a2048..3d03c02bc1b625a3062590813f1a2dd74990f899 100644 (file)
@@ -3,6 +3,7 @@
 #include <signal.h>
 #include <stdint.h>
 #include <stdio.h>
+#include <stdlib.h>
 
 unsigned int mem[] = {
    0x4095A266, 0x66666666,
@@ -246,6 +247,7 @@ float mem1f[] = {
           out);                                                  \
 }
 
+#if (__mips==32) && (__mips_isa_rev>=2) && (__mips_fpr==64 || __mips_fpr==xx)
 #define TEST_FPU64                \
    __asm__ __volatile__(          \
       "cvt.l.s $f0, $f0"  "\n\t"  \
@@ -258,6 +260,7 @@ static void handler(int sig)
 {
    exit(0);
 }
+#endif
 
 void ppMem(double *m, int len)
 {