rom-properties/extlib/uniwidth
David Korth e3a427f6c2 [cmake] msvc.cmake: Make all warnings act as errors. (/W3 /WX)
The MSVC build (64-bit, at least...) now builds with no warnings.
Tested using MSVC 2022 17.6.5.

NOTE: /W4 adds a *lot* of warnings that are mostly just noise. Need to
check /W4 and selectively enable at least some of them...

Removed /wd4482. I don't think this warning is relevant anymore.

Warning fixes:

[extlib] Add (unsigned int) casts where necessary.

[librpbase] Config::ImgTypePrio_t, KeyManager::KeyData_t:
- Change `length` from unsigned int to size_t.
  The struct is 16 bytes on 64-bit either way, but making it size_t
  fixes some conversion warnings.

[librpbase] Hash::Process():
- crc32() returns `unsigned long`, not `uint32_t`, for some reason.
- Also, its length parameter is `unsigned int`, not `size_t`.
- KeyManager::hexStringToBytes(): Take a `size_t` length parameter.

[librpfile] scsi:
- Change cdb_len from `uint8_t` to `size_t`. Using a `uint8_t` argument
  doesn't actually save any memory, since it uses 4 bytes on the stack
  for 32-bit, and one register on 64-bit, regardless.
- Also, limit the maximum cdb size to 260.

[rp-download] Disable warning C4996 when calling GetVersionEx().

[librptexture] DirectDrawSurface:
- Change some `expected_size` variables from `unsigned int` to `size_t`.

[librptexture] PalmOS_Tbmp:
- Change d->bitmapTypeAddr from `off64_t` to `uint32_t`.
- Change some size variables from `unsigned int` to `size_t`.
- loadTbmp(): v3 transparency: Explicitly cast the transparency value
  to uint16_t. (It's stored as a big-endian 32-bit value, but only
  16 bits are used.)
- getNextTbmpAddress(): Cast addresses to `uint32_t`. PalmOS executables
  are 32-bit and cannot possibly exceed 4 GB.
  - FIXME: This function isn't used? (Was it ever used?)

[libromdata]
- DMGPrivate::CartType(): Make `end_offset` constexpr.
- NCCHReader: Add casts for EncSections when using sizeof().
- KeyStoreUIPrivate: binToHexStr(), verifyKeyData():
  - Take a `size_t` length parameter.
- WiiUPackagePrivate: Added a parseHexBinary32() wrapper function
  that returns `uint32_t` instead of `uint64_t`.

[librpbyteswap/tests]
- BitstuffTest: Cast time(nullptr) to `unsigned int`.
  srand() takes `unsigned int`, not `time_t`.

[librpbase/tests]
- RpPngFormatTest: crc32()'s length parameter is `unsigned int`,
  not `size_t`.

[libromdata/tests]
- SuperMagicDriveTest: zlib uses `unsigned int`, so cast array sizes
  to `unsigned int` instead of changing decompress() to take `size_t`.
2025-03-31 21:34:35 -04:00
..
_MODIFIED_GNULIB.txt [uniwidth] Update to Unicode 16.0.0. 2024-09-25 21:56:44 -04:00
bitmap.h [cmake] msvc.cmake: Make all warnings act as errors. (/W3 /WX) 2025-03-31 21:34:35 -04:00
cjk.h [uniwidth] Update to Unicode 15.1.0 and assign width 1 to prepended concatenation marks. 2024-02-17 17:04:15 -05:00
CMakeLists.txt Remove CheckHiddenVisibility.cmake. 2025-01-18 22:34:24 -05:00
streq.h [uniwidth] Update to Unicode 15.1.0 and assign width 1 to prepended concatenation marks. 2024-02-17 17:04:15 -05:00
unitypes.h [uniwidth] Update to Unicode 15.1.0 and assign width 1 to prepended concatenation marks. 2024-02-17 17:04:15 -05:00
uniwidth.h [uniwidth] Update to Unicode 16.0.0. 2024-09-25 21:56:44 -04:00
width0.h [uniwidth] Update to Unicode 16.0.0. 2024-09-25 21:56:44 -04:00
width2.h [uniwidth] Update to Unicode 16.0.0. 2024-09-25 21:56:44 -04:00
width.c [uniwidth] Update to Unicode 15.1.0 and assign width 1 to prepended concatenation marks. 2024-02-17 17:04:15 -05:00