Fix some warnings

This commit is contained in:
Lukas W
2014-01-24 22:04:37 +01:00
parent b1835c99d3
commit ac54fcdac2
7 changed files with 15 additions and 11 deletions

View File

@@ -335,6 +335,7 @@ CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/plugins/zynaddsubfx/zynaddsubfx.rc.in ${CMAKE
SET(WERROR_FLAGS "-Wall -Werror -Werror=unused-function -Wno-sign-compare -Wno-strict-overflow")
SET(CMAKE_C_FLAGS "-O2 -g ${WERROR_FLAGS} ${CMAKE_C_FLAGS}")
SET(CMAKE_CXX_FLAGS "-O2 -g -fno-exceptions ${WERROR_FLAGS} ${CMAKE_CXX_FLAGS}")
set(CMAKE_C_FLAGS_DEBUG "-DLMMS_DEBUG")
# people simply updating git will still have this and mess up build with it

View File

@@ -31,10 +31,12 @@
// set whether debug-stuff (like messages on the console, asserts and other
// additional range-checkings) should be compiled
/*#ifdef LMMS_DEBUG*/
#include <assert.h>
#ifdef LMMS_DEBUG
#include <assert.h>
#else
#define assert(x) ((void)(x))
#endif
#include <cstdio>
/*#endif*/
#endif

View File

@@ -9,7 +9,7 @@
04 apr 03 -- fixed bug in add_track that caused infinite loop
*/
#include "assert.h"
#include "debug.h"
#include "stdlib.h"
#include "stdio.h"
#include "string.h"
@@ -727,8 +727,8 @@ void Alg_event_list::set_start_time(Alg_event *event, double t)
// For Alg_track, change the time and move the event to the right place
// For Alg_seq, find the track and do the update there
long index, i;
Alg_track_ptr track_ptr;
long index = 0, i;
Alg_track_ptr track_ptr = Alg_track_ptr();
if (type == 'e') { // this is an Alg_event_list
// make sure the owner has not changed its event set
assert(events_owner &&
@@ -2283,6 +2283,7 @@ Alg_track_ptr Alg_seq::track(int i)
}
#pragma GCC diagnostic ignored "-Wreturn-type" // ok not to return a value here
Alg_event_ptr &Alg_seq::operator[](int i)
{
int ntracks = track_list.length();
@@ -2296,7 +2297,7 @@ Alg_event_ptr &Alg_seq::operator[](int i)
}
tr++;
}
assert(false); // out of bounds
assert(false); // out of bounds
}

View File

@@ -48,7 +48,7 @@
#ifndef __ALLEGRO__
#define __ALLEGRO__
#include <assert.h>
#include "debug.h"
#include "lmmsconfig.h"

View File

@@ -1,4 +1,4 @@
#include "assert.h"
#include "debug.h"
#include "stdlib.h"
#include "string.h"
#include "ctype.h"

View File

@@ -3,7 +3,7 @@
#include "stdlib.h"
#include "stdio.h"
#include "string.h"
#include "assert.h"
#include "debug.h"
#include <string>
#include <fstream>
#include "allegro.h"

View File

@@ -1,6 +1,6 @@
// allegrowr.cpp -- write sequence to an Allegro file (text)
#include "assert.h"
#include "debug.h"
#include "stdlib.h"
#include <iostream>
#include <fstream>