mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-09 21:22:39 -05:00
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
This commit is contained in:
parent
6bfd7da97c
commit
78b2d13567
2 changed files with 3 additions and 3 deletions
|
|
@ -281,7 +281,7 @@ int open_soundfile(const char *dirname, const char *filename, int headersize,
|
||||||
nchannels = 1;
|
nchannels = 1;
|
||||||
bytespersamp = 2;
|
bytespersamp = 2;
|
||||||
/* copy the first chunk header to beginnning of buffer. */
|
/* copy the first chunk header to beginnning of buffer. */
|
||||||
memcpy(buf, buf + headersize, sizeof(t_wavechunk));
|
memmove(buf, buf + headersize, sizeof(t_wavechunk));
|
||||||
/* post("chunk %c %c %c %c",
|
/* post("chunk %c %c %c %c",
|
||||||
((t_wavechunk *)buf)->wc_id[0],
|
((t_wavechunk *)buf)->wc_id[0],
|
||||||
((t_wavechunk *)buf)->wc_id[1],
|
((t_wavechunk *)buf)->wc_id[1],
|
||||||
|
|
@ -338,7 +338,7 @@ int open_soundfile(const char *dirname, const char *filename, int headersize,
|
||||||
nchannels = 1;
|
nchannels = 1;
|
||||||
bytespersamp = 2;
|
bytespersamp = 2;
|
||||||
/* copy the first chunk header to beginnning of buffer. */
|
/* copy the first chunk header to beginnning of buffer. */
|
||||||
memcpy(buf, buf + headersize, sizeof(t_datachunk));
|
memmove(buf, buf + headersize, sizeof(t_datachunk));
|
||||||
/* read chunks in loop until we get to the data chunk */
|
/* read chunks in loop until we get to the data chunk */
|
||||||
while (strncmp(((t_datachunk *)buf)->dc_id, "SSND", 4))
|
while (strncmp(((t_datachunk *)buf)->dc_id, "SSND", 4))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ OTHER_SRC += $(PDBOX_SRC)
|
||||||
|
|
||||||
$(PDBOXBUILDDIR)/pdbox.rock: $(PDBOX_OBJ) $(MPEG_OBJ)
|
$(PDBOXBUILDDIR)/pdbox.rock: $(PDBOX_OBJ) $(MPEG_OBJ)
|
||||||
|
|
||||||
PDBOXFLAGS = $(PLUGINFLAGS) -fno-strict-aliasing
|
PDBOXFLAGS = $(PLUGINFLAGS) -fno-strict-aliasing -Wno-cast-function-type
|
||||||
PDBOXLDFLAGS = $(PLUGINLDFLAGS)
|
PDBOXLDFLAGS = $(PLUGINLDFLAGS)
|
||||||
ifdef APP_TYPE
|
ifdef APP_TYPE
|
||||||
PDBOXLDFLAGS += -lm
|
PDBOXLDFLAGS += -lm
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue