From 1d2a45e348857f65cc7590b2e7f1b39c30216f92 Mon Sep 17 00:00:00 2001 From: Takamichi Horikawa Date: Sat, 6 Jan 2018 23:00:54 +0900 Subject: fixed compiler warnings for sdl --- libopna/opna.c | 1 + libopna/opnafm.c | 5 +++++ libopna/opnassg.c | 3 +++ 3 files changed, 9 insertions(+) (limited to 'libopna') diff --git a/libopna/opna.c b/libopna/opna.c index 8998a59..5c87127 100644 --- a/libopna/opna.c +++ b/libopna/opna.c @@ -44,6 +44,7 @@ void opna_mix_oscillo(struct opna *opna, int16_t *buf, unsigned samples, struct struct oscillodata *oscillofm = oscillo ? &oscillo[0] : 0; struct oscillodata *oscillossg = oscillo ? &oscillo[6] : 0; #else + (void)oscillo; struct oscillodata *oscillofm = 0, *oscillossg = 0; unsigned offset = 0; #endif diff --git a/libopna/opnafm.c b/libopna/opnafm.c index dc19b6d..7555ef3 100644 --- a/libopna/opnafm.c +++ b/libopna/opnafm.c @@ -607,6 +607,7 @@ void opna_fm_writereg(struct opna_fm *fm, unsigned reg, unsigned val) { } } +#ifdef LIBOPNA_ENABLE_OSCILLO static int gcd(int a, int b) { if (a < b) { int t = a; @@ -621,6 +622,7 @@ static int gcd(int a, int b) { } return b; } +#endif void opna_fm_mix(struct opna_fm *fm, int16_t *buf, unsigned samples, struct oscillodata *oscillo, unsigned offset) { @@ -646,6 +648,9 @@ void opna_fm_mix(struct opna_fm *fm, int16_t *buf, unsigned samples, } } } +#else + (void)oscillo; + (void)offset; #endif unsigned level[6] = {0}; for (unsigned i = 0; i < samples; i++) { diff --git a/libopna/opnassg.c b/libopna/opnassg.c index ee6498a..404be59 100644 --- a/libopna/opnassg.c +++ b/libopna/opnassg.c @@ -316,6 +316,9 @@ void opna_ssg_mix_55466( } } } +#else + (void)oscillo; + (void)offset; #endif unsigned level[3] = {0}; for (int i = 0; i < samples; i++) { -- cgit v1.2.3