summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2005-05-07 22:10:35 +0000
committerDaniel Stenberg <daniel@haxx.se>2005-05-07 22:10:35 +0000
commit4cc0b97609a9c94abef6b4422c2c87c599776f44 (patch)
tree15be2077d74785f421845c5921a64053c8ec4ba8 /apps
parent2505e7bf047b65d5c8b714eb3528dc1c1e178dfd (diff)
downloadrockbox-4cc0b97609a9c94abef6b4422c2c87c599776f44.tar.gz
rockbox-4cc0b97609a9c94abef6b4422c2c87c599776f44.zip
Hush up warnings by defining away functions/macros. This should be fixed if
actual functionality is wanted (by including the proper headers and making sure rockbox provides these functions). pow(), floor(), log() and exp() just feel veeeery floatish... git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6417 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/codecs/dumb/include/dumb.h14
-rw-r--r--apps/codecs/dumb/make/Makefile.inc18
-rw-r--r--apps/codecs/dumb/src/core/rendsig.c22
-rw-r--r--apps/codecs/dumb/src/it/itread.c4
-rw-r--r--apps/codecs/dumb/src/it/xmeffect.c14
5 files changed, 52 insertions, 20 deletions
diff --git a/apps/codecs/dumb/include/dumb.h b/apps/codecs/dumb/include/dumb.h
index 3d6d6f940d..2aae95ccce 100644
--- a/apps/codecs/dumb/include/dumb.h
+++ b/apps/codecs/dumb/include/dumb.h
@@ -83,6 +83,9 @@
83#define ABS(x) (((x) >= 0) ? (x) : (-(x))) 83#define ABS(x) (((x) >= 0) ? (x) : (-(x)))
84 84
85 85
86#if 0 /* This code serves no useful purpose for Rockbox. Possibly the trace
87 thing could be defined for simulator... */
88
86#ifdef DEBUGMODE 89#ifdef DEBUGMODE
87 90
88#ifndef ASSERT 91#ifndef ASSERT
@@ -105,6 +108,17 @@
105 108
106#endif 109#endif
107 110
111#else /* 0 */
112/* disable TRACE() and ASSERT() calls */
113#define TRACE(...)
114#define ASSERT(...)
115
116/* now fake float function to hush the compiler */
117#define pow(x,y) ((x)+(y))
118#define floor(x) x
119#define log(x) (x)
120#define exp(x) (x)
121#endif /* 0 */
108 122
109#define DUMB_ID(a,b,c,d) (((unsigned int)(a) << 24) | \ 123#define DUMB_ID(a,b,c,d) (((unsigned int)(a) << 24) | \
110 ((unsigned int)(b) << 16) | \ 124 ((unsigned int)(b) << 16) | \
diff --git a/apps/codecs/dumb/make/Makefile.inc b/apps/codecs/dumb/make/Makefile.inc
index 4137b04804..9b213d8b76 100644
--- a/apps/codecs/dumb/make/Makefile.inc
+++ b/apps/codecs/dumb/make/Makefile.inc
@@ -15,20 +15,26 @@ $(ALLEGRO_LIB_FILE): CFLAGS := $(CFLAGS)
15 15
16 16
17$(OBJDIR)/%.o: src/core/%.c include/dumb.h include/internal/dumb.h 17$(OBJDIR)/%.o: src/core/%.c include/dumb.h include/internal/dumb.h
18 $(CC) -c -o $@ $< $(CFLAGS) 18 @echo "(dumb) CC $<"
19 @$(CC) -c -o $@ $< $(CFLAGS)
19 20
20$(OBJDIR)/%.o: src/helpers/%.c include/dumb.h 21$(OBJDIR)/%.o: src/helpers/%.c include/dumb.h
21 $(CC) -c -o $@ $< $(CFLAGS) 22 @echo "(dumb) CC $<"
23 @$(CC) -c -o $@ $< $(CFLAGS)
22 24
23$(OBJDIR)/%.o: src/it/%.c include/dumb.h include/internal/it.h 25$(OBJDIR)/%.o: src/it/%.c include/dumb.h include/internal/it.h
24 $(CC) -c -o $@ $< $(CFLAGS) 26 @echo "(dumb) CC $<"
27 @$(CC) -c -o $@ $< $(CFLAGS)
25 28
26$(OBJDIR)/%.o: src/allegro/%.c include/aldumb.h include/dumb.h \ 29$(OBJDIR)/%.o: src/allegro/%.c include/aldumb.h include/dumb.h \
27 include/internal/aldumb.h include/internal/dumb.h 30 include/internal/aldumb.h include/internal/dumb.h
28 $(CC) -c -o $@ $< $(CFLAGS) $(WFLAGS_ALLEGRO) 31 @echo "(dumb) CC $<"
32 @$(CC) -c -o $@ $< $(CFLAGS) $(WFLAGS_ALLEGRO)
29 33
30$(CORE_LIB_FILE): $(CORE_OBJECTS) 34$(CORE_LIB_FILE): $(CORE_OBJECTS)
31 $(AR) rs $@ $^ 35 @echo "(dumb) AR $<"
36 @$(AR) rs $@ $^
32 37
33$(ALLEGRO_LIB_FILE): $(ALLEGRO_OBJECTS) 38$(ALLEGRO_LIB_FILE): $(ALLEGRO_OBJECTS)
34 $(AR) rs $@ $^ 39 @echo "(dumb) AR $<"
40 @$(AR) rs $@ $^
diff --git a/apps/codecs/dumb/src/core/rendsig.c b/apps/codecs/dumb/src/core/rendsig.c
index a36ceb41cf..6b39ce7de9 100644
--- a/apps/codecs/dumb/src/core/rendsig.c
+++ b/apps/codecs/dumb/src/core/rendsig.c
@@ -141,16 +141,18 @@ void duh_sigrenderer_set_sigparam(
141 if (!sigrenderer) return; 141 if (!sigrenderer) return;
142 142
143 proc = sigrenderer->desc->sigrenderer_set_sigparam; 143 proc = sigrenderer->desc->sigrenderer_set_sigparam;
144 if (proc) 144 if (proc) {
145 (*proc)(sigrenderer->sigrenderer, id, value); 145 (*proc)(sigrenderer->sigrenderer, id, value);
146 else 146 return;
147 TRACE("Parameter #%d = %ld for signal %c%c%c%c, which does not take parameters.\n", 147 }
148 (int)id, 148
149 value, 149 TRACE("Parameter #%d = %ld for signal %c%c%c%c, which does not take parameters.\n",
150 (int)(sigrenderer->desc->type >> 24), 150 (int)id,
151 (int)(sigrenderer->desc->type >> 16), 151 value,
152 (int)(sigrenderer->desc->type >> 8), 152 (int)(sigrenderer->desc->type >> 24),
153 (int)(sigrenderer->desc->type)); 153 (int)(sigrenderer->desc->type >> 16),
154 (int)(sigrenderer->desc->type >> 8),
155 (int)(sigrenderer->desc->type));
154} 156}
155 157
156 158
diff --git a/apps/codecs/dumb/src/it/itread.c b/apps/codecs/dumb/src/it/itread.c
index 7384b30a92..8b4a322ee1 100644
--- a/apps/codecs/dumb/src/it/itread.c
+++ b/apps/codecs/dumb/src/it/itread.c
@@ -555,8 +555,8 @@ static long it_read_sample_data(int cmwt, IT_SAMPLE *sample, unsigned char conve
555 /** WARNING - unresolved business here... test with ModPlug? */ 555 /** WARNING - unresolved business here... test with ModPlug? */
556 556
557 if (sample->flags & IT_SAMPLE_STEREO) 557 if (sample->flags & IT_SAMPLE_STEREO)
558 exit(37); 558 return -1;
559 559
560/* 560/*
561//#ifndef STEREO_SAMPLES_COUNT_AS_TWO 561//#ifndef STEREO_SAMPLES_COUNT_AS_TWO
562 ASSERT(!(sample->flags & IT_SAMPLE_STEREO)); 562 ASSERT(!(sample->flags & IT_SAMPLE_STEREO));
diff --git a/apps/codecs/dumb/src/it/xmeffect.c b/apps/codecs/dumb/src/it/xmeffect.c
index 51995f3bb8..81b86c95b6 100644
--- a/apps/codecs/dumb/src/it/xmeffect.c
+++ b/apps/codecs/dumb/src/it/xmeffect.c
@@ -78,12 +78,16 @@ static const char xm_has_memory[] = {
78/* Effects marked with 'special' are handled specifically in itrender.c */ 78/* Effects marked with 'special' are handled specifically in itrender.c */
79void _dumb_it_xm_convert_effect(int effect, int value, IT_ENTRY *entry) 79void _dumb_it_xm_convert_effect(int effect, int value, IT_ENTRY *entry)
80{ 80{
81#ifdef SIMULATOR
81const int log = 0; 82const int log = 0;
83#endif
82 84
83 if ((!effect && !value) || (effect >= XM_N_EFFECTS)) 85 if ((!effect && !value) || (effect >= XM_N_EFFECTS))
84 return; 86 return;
85 87
88#ifdef SIMULATOR
86if (log) printf("%c%02X", (effect<10)?('0'+effect):('A'+effect-10), value); 89if (log) printf("%c%02X", (effect<10)?('0'+effect):('A'+effect-10), value);
90#endif
87 91
88 /* Linearisation of the effect number... */ 92 /* Linearisation of the effect number... */
89 if (effect == XM_E) { 93 if (effect == XM_E) {
@@ -94,7 +98,9 @@ if (log) printf("%c%02X", (effect<10)?('0'+effect):('A'+effect-10), value);
94 value = LOW(value); 98 value = LOW(value);
95 } 99 }
96 100
101#ifdef SIMULATOR
97if (log) printf(" - %2d %02X", effect, value); 102if (log) printf(" - %2d %02X", effect, value);
103#endif
98 104
99#if 0 // This should be handled in itrender.c! 105#if 0 // This should be handled in itrender.c!
100 /* update effect memory */ 106 /* update effect memory */
@@ -227,16 +233,20 @@ if (log) printf(" - %2d %02X", effect, value);
227 entry->mask &= ~IT_ENTRY_EFFECT; 233 entry->mask &= ~IT_ENTRY_EFFECT;
228 } 234 }
229 235
236#ifdef SIMULATOR
230if (log) printf(" - %2d %02X", effect, value); 237if (log) printf(" - %2d %02X", effect, value);
231 238#endif
239
232 /* Inverse linearisation... */ 240 /* Inverse linearisation... */
233 if (effect >= SBASE && effect < SBASE+16) { 241 if (effect >= SBASE && effect < SBASE+16) {
234 value = EFFECT_VALUE(effect-SBASE, value); 242 value = EFFECT_VALUE(effect-SBASE, value);
235 effect = IT_S; 243 effect = IT_S;
236 } 244 }
237 245
246#ifdef SIMULATOR
238if (log) printf(" - %c%02X\n", 'A'+effect-1, value); 247if (log) printf(" - %c%02X\n", 'A'+effect-1, value);
239 248#endif
249
240 entry->effect = effect; 250 entry->effect = effect;
241 entry->effectvalue = value; 251 entry->effectvalue = value;
242} 252}