Skip to content

Commit

Permalink
Fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
tscbp committed Sep 10, 2015
1 parent aa8b0ef commit 68f5ae9
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 19 deletions.
6 changes: 3 additions & 3 deletions libplatform/platform_win32.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ Utf8ToFilename::~Utf8ToFilename( )
wchar_t *
Utf8ToFilename::ConvertToUTF16 ( const string &utf8string )
{
int num_bytes;
size_t num_bytes;
size_t num_chars;
wchar_t *retval;

Expand Down Expand Up @@ -408,7 +408,7 @@ Utf8ToFilename::ConvertToUTF16Buf ( const char *utf8,
* @return the length of the prefix of @p utf8string in
* characters
*/
int
size_t
Utf8ToFilename::GetPrefixLen ( const string &utf8string )
{
if (utf8string.find("\\\\?\\") == 0)
Expand Down Expand Up @@ -689,7 +689,7 @@ Utf8ToFilename::Utf8DecodeChar ( const UINT8 *utf8_char,
UINT8 mask;
const UINT8 *p;
UINT32 ucs4;
int valid_len;
size_t valid_len;

ASSERT(utf8_char);
ASSERT(num_bytes > 0);
Expand Down
13 changes: 0 additions & 13 deletions libplatform/platform_win32.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,19 +54,6 @@ namespace mp4v2 { namespace platform {

///////////////////////////////////////////////////////////////////////////////

// some macros for constant expressions
#define INT8_C(x) x
#define INT16_C(x) x
#define INT32_C(x) x ## L
#define INT64_C(x) x ## LL

#define UINT8_C(x) x
#define UINT16_C(x) x
#define UINT32_C(x) x ## UL
#define UINT64_C(x) x ## ULL

///////////////////////////////////////////////////////////////////////////////

#ifdef min
# undef min
#endif
Expand Down
2 changes: 1 addition & 1 deletion libplatform/platform_win32_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class Utf8ToFilename
static int ConvertToUTF16Buf ( const char *utf8,
wchar_t *utf16_buf,
size_t num_bytes );
static int GetPrefixLen ( const string &utf8string );
static size_t GetPrefixLen ( const string &utf8string );

static int IsAbsolute ( const string &utf8string );

Expand Down
4 changes: 2 additions & 2 deletions src/mp4file_io.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ char* MP4File::ReadCountedString(uint8_t charSize, bool allowExpandedCount, uint
charLength = ReadUInt8();
}

if (fixedLength && (charLength > fixedLength - 1)) {
if (fixedLength && (charLength > (uint8_t)(fixedLength - 1))) {
/*
* The counted length of this string is greater than the
* maxiumum fixed length, so truncate the string to the
Expand All @@ -397,7 +397,7 @@ char* MP4File::ReadCountedString(uint8_t charSize, bool allowExpandedCount, uint
* a non counted string has been used in the place of a
* counted string).
*/
WARNING(charLength > fixedLength - 1);
WARNING( charLength > (uint8_t)( fixedLength - 1 ) );
charLength = fixedLength - 1U;
}

Expand Down

0 comments on commit 68f5ae9

Please sign in to comment.