Commit 733e274c authored by Steve Lhomme's avatar Steve Lhomme

libebml2: more warning fixes

git-svn-id: https://matroska.svn.sourceforge.net/svnroot/matroska/trunk/foundation_src@831 a6f86f6d-0131-4f8e-9e7b-e335508773d5
parent 4c9ad6d5
......@@ -56,7 +56,7 @@ static err_t MemWrite(memstream* p, const void* Data, size_t Size, size_t* Writt
if (Size + p->Pos > p->Size)
return ERR_INVALID_PARAM;
assert(p->Ptr!=NULL);
memcpy(p->Ptr + p->Pos, Data, Size);
memcpy((uint8_t*)p->Ptr + p->Pos, Data, Size);
p->Pos += Size;
*Written = Size;
return ERR_NONE;
......
......@@ -507,7 +507,7 @@ ebml_element *EBML_FindNextElement(stream *Input, const ebml_parser_context *pCo
filepos_t CurrentPos;
filepos_t StartPos = Stream_Seek(Input,0,SEEK_CUR);
ebml_parser_context OrigContext;
ebml_parser_context *Context = &OrigContext;
const ebml_parser_context *Context = &OrigContext;
if (StartPos == INVALID_FILEPOS_T)
return NULL;
......
......@@ -278,7 +278,7 @@ static filepos_t UpdateSizeSignedInt(ebml_integer *Element, bool_t bWithDefault,
Element->Base.DataSize = 2;
} else if (Element->Value <= 0x7FFFFF && Element->Value >= (-0x800000)) {
Element->Base.DataSize = 3;
} else if (Element->Value <= (int64_t)(0x7FFFFFFF) && Element->Value >= (int64_t)(-0x80000000)) {
} else if (Element->Value <= (int64_t)(0x7FFFFFFF) && Element->Value >= -(int64_t)(0x80000000)) {
Element->Base.DataSize = 4;
} else if (Element->Value <= 0x7FFFFFFFFF && Element->Value >= (-0x8000000000)) {
Element->Base.DataSize = 5;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment