Fix a pile of warnings

Originally committed to SVN as r5483.
This commit is contained in:
Thomas Goyne 2011-07-16 05:01:36 +00:00
parent b509cb0be5
commit 0616b39ffe
8 changed files with 10 additions and 17 deletions

View file

@ -1,4 +1,4 @@
#ifndef AGI_PRE #if !defined(AGI_PRE) && !defined(LAGI_PRE)
#ifdef _WIN32 // Windows specific settings #ifdef _WIN32 // Windows specific settings
#define HAVE_PTHREAD 1 #define HAVE_PTHREAD 1

View file

@ -102,8 +102,6 @@
#ifndef GOOGLE_MUTEX_H_ #ifndef GOOGLE_MUTEX_H_
#define GOOGLE_MUTEX_H_ #define GOOGLE_MUTEX_H_
#include "config.h" // to figure out pthreads support
#if defined(NO_THREADS) #if defined(NO_THREADS)
typedef int MutexType; // to keep a lock-count typedef int MutexType; // to keep a lock-count
#elif defined(_WIN32) || defined(__CYGWIN32__) || defined(__CYGWIN64__) #elif defined(_WIN32) || defined(__CYGWIN32__) || defined(__CYGWIN64__)

View file

@ -18,10 +18,6 @@
/// @brief Platform specific types. /// @brief Platform specific types.
/// @ingroup libaegisub /// @ingroup libaegisub
#ifdef LAGI
#include "config.h"
#endif
#ifndef LAGI_PRE #ifndef LAGI_PRE
#ifdef HAVE_SYS_TIME_H #ifdef HAVE_SYS_TIME_H
# include <sys/time.h> # include <sys/time.h>

View file

@ -1,7 +1,7 @@
#define LAGI_PRE
#include "config.h" #include "config.h"
#define LAGI_PRE
// Common C // Common C
#include <cassert> #include <cassert>
#include <cerrno> #include <cerrno>

View file

@ -118,7 +118,6 @@ AudioSpectrumRenderer::AudioSpectrumRenderer()
, colors_selected(12) , colors_selected(12)
, derivation_size(8) , derivation_size(8)
, derivation_dist(8) , derivation_dist(8)
, audio_scratch(0)
#ifdef WITH_FFTW #ifdef WITH_FFTW
, dft_plan(0) , dft_plan(0)
, dft_input(0) , dft_input(0)
@ -126,6 +125,7 @@ AudioSpectrumRenderer::AudioSpectrumRenderer()
#else #else
, fft_scratch(0) , fft_scratch(0)
#endif #endif
, audio_scratch(0)
{ {
colors_normal.InitIcyBlue_Normal(); colors_normal.InitIcyBlue_Normal();
colors_selected.InitIcyBlue_Selected(); colors_selected.InitIcyBlue_Selected();

View file

@ -250,10 +250,10 @@ void AudioMarkerDialogueTiming::InitPair(AudioMarkerDialogueTiming *marker1, Aud
AudioTimingControllerDialogue::AudioTimingControllerDialogue(AudioController *audio_controller, SelectionController<AssDialogue> *selection_controller, AssFile *ass) AudioTimingControllerDialogue::AudioTimingControllerDialogue(AudioController *audio_controller, SelectionController<AssDialogue> *selection_controller, AssFile *ass)
: timing_modified(false) : timing_modified(false)
, commit_id(-1) , commit_id(-1)
, ass(ass)
, auto_commit(OPT_GET("Audio/Auto/Commit"))
, audio_controller(audio_controller) , audio_controller(audio_controller)
, auto_commit(OPT_GET("Audio/Auto/Commit"))
, selection_controller(selection_controller) , selection_controller(selection_controller)
, ass(ass)
{ {
assert(audio_controller != 0); assert(audio_controller != 0);

View file

@ -77,16 +77,16 @@ BaseGrid::BaseGrid(wxWindow* parent, agi::Context *context, const wxSize& size,
: wxWindow(parent, -1, wxDefaultPosition, size, style, name) : wxWindow(parent, -1, wxDefaultPosition, size, style, name)
, lineHeight(1) // non-zero to avoid div by 0 , lineHeight(1) // non-zero to avoid div by 0
, lastRow(-1) , lastRow(-1)
, extendRow(-1)
, holding(false) , holding(false)
, scrollBar(new wxScrollBar(this, GRID_SCROLLBAR, wxDefaultPosition, wxDefaultSize, wxSB_VERTICAL))
, bmp(0) , bmp(0)
, byFrame(false)
, extendRow(-1)
, active_line(0) , active_line(0)
, batch_level(0) , batch_level(0)
, batch_active_line_changed(false) , batch_active_line_changed(false)
, context(context) , context(context)
, yPos(0) , yPos(0)
, byFrame(false)
, scrollBar(new wxScrollBar(this, GRID_SCROLLBAR, wxDefaultPosition, wxDefaultSize, wxSB_VERTICAL))
{ {
scrollBar->SetScrollbar(0,10,100,10); scrollBar->SetScrollbar(0,10,100,10);
@ -456,7 +456,6 @@ void BaseGrid::DrawImage(wxDC &dc) {
for (int i = 0; i < nDraw + 1; i++) { for (int i = 0; i < nDraw + 1; i++) {
int curRow = i + yPos - 1; int curRow = i + yPos - 1;
int curColor = 0; int curColor = 0;
bool collides = false;
wxArrayString strings; wxArrayString strings;
strings.reserve(11); strings.reserve(11);

View file

@ -198,7 +198,7 @@ struct time_snap_frame : public validate_video_loaded {
int shiftBy = c->videoController->TimeAtFrame(c->videoController->GetFrameN(),agi::vfr::START) - cur->Start.GetMS(); int shiftBy = c->videoController->TimeAtFrame(c->videoController->GetFrameN(),agi::vfr::START) - cur->Start.GetMS();
for (size_t i = 0; i < sels.size(); ++i) { for (size_t i = 0; i < sels.size(); ++i) {
if (cur = c->subsGrid->GetDialogue(sels[i])) { if ((cur = c->subsGrid->GetDialogue(sels[i]))) {
cur->Start.SetMS(cur->Start.GetMS() + shiftBy); cur->Start.SetMS(cur->Start.GetMS() + shiftBy);
cur->End.SetMS(cur->End.GetMS() + shiftBy); cur->End.SetMS(cur->End.GetMS() + shiftBy);
} }