diff options
author | William Wilgus <me.theuser@yahoo.com> | 2018-12-08 06:19:28 -0600 |
---|---|---|
committer | William Wilgus <me.theuser@yahoo.com> | 2018-12-08 06:23:19 -0600 |
commit | 78b2d135671c798dbbc36086cbbf278038d34669 (patch) | |
tree | 0ef174431edadd5a00d8f72b3d118fa187bb0312 | |
parent | 6bfd7da97c659f96eb38051ce31fcc7ff087ed16 (diff) | |
download | rockbox-78b2d135671c798dbbc36086cbbf278038d34669.tar.gz rockbox-78b2d135671c798dbbc36086cbbf278038d34669.zip |
Pdbox hide cast-function-type fix overlapping memcpy
dsoundfile.c used memcpy for overlapping memory regions switched to memmove
Suppress the 160+ warnings for cast-function-type
This plugin would require major work to fix these warnings
Change-Id: I309d914839c1e70126a05b387863fd21613497a9
-rw-r--r-- | apps/plugins/pdbox/PDa/src/d_soundfile.c | 4 | ||||
-rw-r--r-- | apps/plugins/pdbox/pdbox.make | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/apps/plugins/pdbox/PDa/src/d_soundfile.c b/apps/plugins/pdbox/PDa/src/d_soundfile.c index 3824cd5c37..9053edc86b 100644 --- a/apps/plugins/pdbox/PDa/src/d_soundfile.c +++ b/apps/plugins/pdbox/PDa/src/d_soundfile.c | |||
@@ -281,7 +281,7 @@ int open_soundfile(const char *dirname, const char *filename, int headersize, | |||
281 | nchannels = 1; | 281 | nchannels = 1; |
282 | bytespersamp = 2; | 282 | bytespersamp = 2; |
283 | /* copy the first chunk header to beginnning of buffer. */ | 283 | /* copy the first chunk header to beginnning of buffer. */ |
284 | memcpy(buf, buf + headersize, sizeof(t_wavechunk)); | 284 | memmove(buf, buf + headersize, sizeof(t_wavechunk)); |
285 | /* post("chunk %c %c %c %c", | 285 | /* post("chunk %c %c %c %c", |
286 | ((t_wavechunk *)buf)->wc_id[0], | 286 | ((t_wavechunk *)buf)->wc_id[0], |
287 | ((t_wavechunk *)buf)->wc_id[1], | 287 | ((t_wavechunk *)buf)->wc_id[1], |
@@ -338,7 +338,7 @@ int open_soundfile(const char *dirname, const char *filename, int headersize, | |||
338 | nchannels = 1; | 338 | nchannels = 1; |
339 | bytespersamp = 2; | 339 | bytespersamp = 2; |
340 | /* copy the first chunk header to beginnning of buffer. */ | 340 | /* copy the first chunk header to beginnning of buffer. */ |
341 | memcpy(buf, buf + headersize, sizeof(t_datachunk)); | 341 | memmove(buf, buf + headersize, sizeof(t_datachunk)); |
342 | /* read chunks in loop until we get to the data chunk */ | 342 | /* read chunks in loop until we get to the data chunk */ |
343 | while (strncmp(((t_datachunk *)buf)->dc_id, "SSND", 4)) | 343 | while (strncmp(((t_datachunk *)buf)->dc_id, "SSND", 4)) |
344 | { | 344 | { |
diff --git a/apps/plugins/pdbox/pdbox.make b/apps/plugins/pdbox/pdbox.make index e95cdba2b9..7ec998dc5e 100644 --- a/apps/plugins/pdbox/pdbox.make +++ b/apps/plugins/pdbox/pdbox.make | |||
@@ -20,7 +20,7 @@ OTHER_SRC += $(PDBOX_SRC) | |||
20 | 20 | ||
21 | $(PDBOXBUILDDIR)/pdbox.rock: $(PDBOX_OBJ) $(MPEG_OBJ) | 21 | $(PDBOXBUILDDIR)/pdbox.rock: $(PDBOX_OBJ) $(MPEG_OBJ) |
22 | 22 | ||
23 | PDBOXFLAGS = $(PLUGINFLAGS) -fno-strict-aliasing | 23 | PDBOXFLAGS = $(PLUGINFLAGS) -fno-strict-aliasing -Wno-cast-function-type |
24 | PDBOXLDFLAGS = $(PLUGINLDFLAGS) | 24 | PDBOXLDFLAGS = $(PLUGINLDFLAGS) |
25 | ifdef APP_TYPE | 25 | ifdef APP_TYPE |
26 | PDBOXLDFLAGS += -lm | 26 | PDBOXLDFLAGS += -lm |