summaryrefslogtreecommitdiff
path: root/bat
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2020-02-05 00:12:19 -0800
committerTakashi Iwai <tiwai@suse.de>2020-02-10 12:38:52 +0100
commit62a765087e3885a463dbf0d888c5d666da9ee7b3 (patch)
tree77d3d572ebc0ee34fa2582e4335474d179f0c153 /bat
parentf80a290153f210bb80165ac8dc6b1dccaa24781d (diff)
downloadalsa-utils-62a765087e3885a463dbf0d888c5d666da9ee7b3.tar.gz
Avoid pointer arithmetic on `void *`
The pointer operand to the binary `+` operator must be to a complete object type. Signed-off-by: Michael Forney <mforney@mforney.org> Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'bat')
-rw-r--r--bat/common.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bat/common.c b/bat/common.c
index d3d1f28..339e749 100644
--- a/bat/common.c
+++ b/bat/common.c
@@ -231,7 +231,7 @@ int generate_input_data(struct bat *bat, void *buffer, int bytes, int frames)
load = 0;
while (1) {
- err = fread(buffer + load, 1, bytes - load, bat->fp);
+ err = fread((char *)buffer + load, 1, bytes - load, bat->fp);
if (0 == err) {
if (feof(bat->fp)) {
fprintf(bat->log,