mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-22 19:53:52 +00:00
Even more -Wall fixes - and added -Wall to test makefiles to actually catch them...
This commit is contained in:
parent
1ba1998223
commit
160e8655d2
9 changed files with 15 additions and 12 deletions
|
@ -1,4 +1,4 @@
|
||||||
GCC=g++
|
GCC=g++ -Wall
|
||||||
|
|
||||||
all: sdl_driver_test ois_driver_test evtlist_test
|
all: sdl_driver_test ois_driver_test evtlist_test
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
GCC=g++
|
GCC=g++ -Wall
|
||||||
|
|
||||||
all: sdl_test
|
all: sdl_test
|
||||||
|
|
||||||
|
|
|
@ -97,8 +97,8 @@ size_t FFMpegSource::read(void *data, size_t length)
|
||||||
|
|
||||||
// First, copy over any stored data we might be sitting on
|
// First, copy over any stored data we might be sitting on
|
||||||
{
|
{
|
||||||
int s = storage.size();
|
size_t s = storage.size();
|
||||||
int copy = s;
|
size_t copy = s;
|
||||||
if(s)
|
if(s)
|
||||||
{
|
{
|
||||||
// Make sure there's room
|
// Make sure there's room
|
||||||
|
@ -111,6 +111,7 @@ size_t FFMpegSource::read(void *data, size_t length)
|
||||||
left -= copy;
|
left -= copy;
|
||||||
|
|
||||||
// Is there anything left in the storage?
|
// Is there anything left in the storage?
|
||||||
|
assert(s>= copy);
|
||||||
s -= copy;
|
s -= copy;
|
||||||
if(s)
|
if(s)
|
||||||
{
|
{
|
||||||
|
@ -133,7 +134,7 @@ size_t FFMpegSource::read(void *data, size_t length)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// We only allow one stream per file at the moment
|
// We only allow one stream per file at the moment
|
||||||
assert(StreamNum == packet.stream_index);
|
assert((int)StreamNum == packet.stream_index);
|
||||||
|
|
||||||
// Decode the packet
|
// Decode the packet
|
||||||
int len = AVCODEC_MAX_AUDIO_FRAME_SIZE;
|
int len = AVCODEC_MAX_AUDIO_FRAME_SIZE;
|
||||||
|
@ -151,7 +152,7 @@ size_t FFMpegSource::read(void *data, size_t length)
|
||||||
if(len > 0)
|
if(len > 0)
|
||||||
{
|
{
|
||||||
// copy = how many bytes do we copy now
|
// copy = how many bytes do we copy now
|
||||||
int copy = len;
|
size_t copy = len;
|
||||||
if(copy > left)
|
if(copy > left)
|
||||||
copy = left;
|
copy = left;
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@ class FFMpegSource : public SampleSource
|
||||||
{
|
{
|
||||||
AVFormatContext *FmtCtx;
|
AVFormatContext *FmtCtx;
|
||||||
AVCodecContext *CodecCtx;
|
AVCodecContext *CodecCtx;
|
||||||
int StreamNum;
|
unsigned int StreamNum;
|
||||||
|
|
||||||
std::vector<uint8_t> storage;
|
std::vector<uint8_t> storage;
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
GCC=g++ -I../
|
GCC=g++ -I../ -Wall
|
||||||
|
|
||||||
all: audiere_source_test ffmpeg_source_test openal_output_test openal_audiere_test openal_ffmpeg_test
|
all: audiere_source_test ffmpeg_source_test openal_output_test openal_audiere_test openal_ffmpeg_test
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
GCC=g++ -I../
|
GCC=g++ -I../ -Wall
|
||||||
|
|
||||||
all: ogre_client_test audiere_client_test memory_server_test buffer_filter_test file_server_test slice_filter_test file_write_test
|
all: ogre_client_test audiere_client_test memory_server_test buffer_filter_test file_server_test slice_filter_test file_write_test
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,9 @@ class MangleArchive : public Ogre::Archive
|
||||||
public:
|
public:
|
||||||
MangleArchive(VFSPtr _vfs, const std::string &name,
|
MangleArchive(VFSPtr _vfs, const std::string &name,
|
||||||
const std::string &archType = "Mangle")
|
const std::string &archType = "Mangle")
|
||||||
: vfs(_vfs), Ogre::Archive(name, archType) {}
|
: Ogre::Archive(name, archType)
|
||||||
|
, vfs(_vfs)
|
||||||
|
{}
|
||||||
|
|
||||||
bool isCaseSensitive() const { return vfs->isCaseSensitive; }
|
bool isCaseSensitive() const { return vfs->isCaseSensitive; }
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
GCC=g++ -I../
|
GCC=g++ -I../ -Wall
|
||||||
|
|
||||||
all: dummy_test ogre_client_test ogre_resource_test ogre_server_test physfs_server_test
|
all: dummy_test ogre_client_test ogre_resource_test ogre_server_test physfs_server_test
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@ void print(FileInfoPtr inf) { print(*inf); }
|
||||||
|
|
||||||
void print(FileInfoList &lst)
|
void print(FileInfoList &lst)
|
||||||
{
|
{
|
||||||
for(int i=0; i<lst.size(); i++)
|
for(unsigned i=0; i<lst.size(); i++)
|
||||||
print(lst[i]);
|
print(lst[i]);
|
||||||
}
|
}
|
||||||
void print(FileInfoListPtr lst) { print(*lst); }
|
void print(FileInfoListPtr lst) { print(*lst); }
|
||||||
|
|
Loading…
Reference in a new issue