altos: Fix new GCC warnings
authorKeith Packard <keithp@keithp.com>
Sun, 12 Nov 2017 04:52:01 +0000 (20:52 -0800)
committerKeith Packard <keithp@keithp.com>
Sun, 12 Nov 2017 04:52:01 +0000 (20:52 -0800)
* Duplicate 'const' in test code.
* Mis-formatted loop in kf_rem_pio2
* Unused 'one' in sf_cos

Signed-off-by: Keith Packard <keithp@keithp.com>
src/kernel/ao_host.h
src/math/kf_rem_pio2.c
src/math/sf_cos.c

index a7fa5ec2fa4d498a1220093a86f4ea1579792fef..50583f52929722d14575fd185bdc3fd95389d236 100644 (file)
@@ -111,7 +111,7 @@ ao_dump_state(void *wchan);
 void
 ao_sleep(void *wchan);
 
-const char const * const ao_state_names[] = {
+const char * const ao_state_names[] = {
        "startup", "idle", "pad", "boost", "fast",
        "coast", "drogue", "main", "landed", "invalid"
 };
index 261c48129651743ca5b823f7f58deb7922d733f9..1573ca9f629dac4c68e22de930b2d712b5b8e16a 100644 (file)
@@ -77,7 +77,8 @@ twon8  =  3.9062500000e-03; /* 0x3b800000 */
 
     /* compute q[0],q[1],...q[jk] */
        for (i=0;i<=jk;i++) {
-           for(j=0,fw=0.0;j<=jx;j++) fw += x[j]*f[jx+i-j]; q[i] = fw;
+           for(j=0,fw=0.0;j<=jx;j++) fw += x[j]*f[jx+i-j];
+           q[i] = fw;
        }
 
        jz = jk;
index 4c0a9a53569ada72f1449517297d116af32534aa..2f46ec32744b0aa664a32010a9301236a67b72b4 100644 (file)
 
 #include "fdlibm.h"
 
-#ifdef __STDC__
-static const float one=1.0;
-#else
-static float one=1.0;
-#endif
-
 #ifdef __STDC__
        float cosf(float x)
 #else