kodi-game / game.libretro

Libretro compatibility layer for the Kodi Game API
GNU General Public License v2.0
37 stars 26 forks source link

Fix compiler warnings on Windows #88

Closed garbear closed 2 years ago

garbear commented 2 years ago

Description

As title says, this change fixes a compiler warning on Windows. The function Read() returns ssize_t (see binary add-on API).

Warnings were:

GameInfoLoader.cpp(63): warning C4244: 'argument': conversion from 'int64_t' to 'size_t', possible loss of data

GameInfoLoader.cpp(77): warning C4244: '=': conversion from 'ssize_t' to 'unsigned int', possible loss of data

Cheevos.cpp(236): warning C4018: '<': signed/unsigned mismatch

CheevosFrontendBridge.cpp(57): warning C4244: 'return': conversion from 'const int64_t' to 'size_t', possible loss of data

InputManager.cpp(132): warning C4018: '>=': signed/unsigned mismatch

InputManager.cpp(156): warning C4018: '<': signed/unsigned mismatch

InputManager.cpp(185): warning C4018: '<': signed/unsigned mismatch

InputManager.cpp(247): warning C4018: '>=': signed/unsigned mismatch

How has this been tested?

Passes CI. Observed no more warnings in the log.