From 44fbaa041af0b1d9306d8ec0d6ad2e137f50f464 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Fri, 3 May 2013 23:34:51 +0200 Subject: [PATCH] Fix some warnings. --- synth.cpp | 2 +- synth_main.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/synth.cpp b/synth.cpp index 4c039c2..90c16e0 100644 --- a/synth.cpp +++ b/synth.cpp @@ -127,7 +127,7 @@ vector synth(const vector &pulses) int len_samples = int(ceil(pulses.back().start + (pulses.back().end - pulses.back().start) * 2)); - fprintf(stderr, "%d pulses, total %.2f seconds (%d samples)\n", pulses.size(), len_samples / float(WAVE_FREQ), len_samples); + fprintf(stderr, "%d pulses, total %.2f seconds (%d samples)\n", int(pulses.size()), len_samples / float(WAVE_FREQ), len_samples); int pulse_begin = 0; diff --git a/synth_main.cpp b/synth_main.cpp index 9f2ca96..88d0492 100644 --- a/synth_main.cpp +++ b/synth_main.cpp @@ -34,7 +34,7 @@ int main(int argc, char **argv) vector samples = synth(pulses); - for (int i = 0; i < samples.size(); ++i) { + for (unsigned i = 0; i < samples.size(); ++i) { //printf("%f %f\n", samples[i], refiltered_samples[i]); short s = lrintf(samples[i] * 16384.0f); fwrite(&s, 2, 1, stdout); -- 2.39.2