Skip to content

Commit 64e02f7

Browse files
committed
fix 'void pointer arithmetic' errors.
1 parent 96b3ff1 commit 64e02f7

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

src/sound_alsa05.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ static void play(void *b, int i)
171171
size_t to_copy = (f < i) ? f : i;
172172

173173
memcpy(mybuffer_nextfree, b, to_copy);
174-
b += to_copy;
174+
b = (char *)b + to_copy;
175175
mybuffer_nextfree += to_copy;
176176
f -= to_copy;
177177
i -= to_copy;
@@ -211,4 +211,3 @@ struct sound_driver sound_alsa05 = {
211211
bufdump, /* bufdump */
212212
NULL
213213
};
214-

src/sound_coreaudio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ static void play(void *b, int i)
233233
while (i) {
234234
if ((j = write_buffer(b, i)) > 0) {
235235
i -= j;
236-
b += j;
236+
b = (char *)b + j;
237237
} else
238238
break;
239239
}

src/sound_qnx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ static void play(void *b, int i)
8080
do {
8181
if ((j = write(fd_audio, b, i)) > 0) {
8282
i -= j;
83-
b += j;
83+
b = (char *)b + j;
8484
} else {
8585
break;
8686
}

0 commit comments

Comments
 (0)