diff options
author | marxin <mliska@suse.cz> | 2019-02-21 20:57:39 +0100 |
---|---|---|
committer | marxin <mliska@suse.cz> | 2019-02-27 07:45:57 +0100 |
commit | e5f665c7187b6934a71169cab5075f899150f17a (patch) | |
tree | a42da38f0076409975980452e8264a60d94f747d /modules/gdnative | |
parent | ce114e35dda4b3f282abb458f8409db2369b279e (diff) |
Fix -Wsign-compare warnings.
I decided to modify code in a defensive way. Ideally functions
like size() or length() should return an unsigned type.
Diffstat (limited to 'modules/gdnative')
-rw-r--r-- | modules/gdnative/videodecoder/video_stream_gdnative.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/gdnative/videodecoder/video_stream_gdnative.cpp b/modules/gdnative/videodecoder/video_stream_gdnative.cpp index 8c2a84f60b..d1794b6c36 100644 --- a/modules/gdnative/videodecoder/video_stream_gdnative.cpp +++ b/modules/gdnative/videodecoder/video_stream_gdnative.cpp @@ -76,7 +76,7 @@ int64_t GDAPI godot_videodecoder_file_seek(void *ptr, int64_t pos, int whence) { } break; case SEEK_CUR: { // Just in case it doesn't exist - if (pos < 0 && -pos > file->get_position()) { + if (pos < 0 && (size_t)-pos > file->get_position()) { return -1; } pos = pos + static_cast<int>(file->get_position()); @@ -86,7 +86,7 @@ int64_t GDAPI godot_videodecoder_file_seek(void *ptr, int64_t pos, int whence) { } break; case SEEK_END: { // Just in case something goes wrong - if (-pos > len) { + if ((size_t)-pos > len) { return -1; } file->seek_end(pos); |