flutter/examples/platform_channel/windows/runner
Chris Bracken 9f8fe3f04c
[Windows] Fix signed/unsigned int comparison (#142341)
Previously, we were comparing the signed int `target_length` (returned by WideCharToMultiByte) to a size_t string length, resulting in a signed/unsigned comparison warning as follows:

```
windows\runner\utils.cpp(54,43): warning C4018:  '>': signed/unsigned mismatch
```

WideCharToMultiByte returns:
* 0 on error
* the number of bytes written to the buffer pointed to by its fifth parameter, lpMultiByteStr, on success.

As a result it's safe to store the return value in an unsigned int, which eliminates the warning.

No changes to tests since this is dependent on end-user project settings/modifications and does not trigger a warning with default project settings.

Fixes: https://github.com/flutter/flutter/issues/134227
2024-02-07 00:09:57 +00:00
..
CMakeLists.txt [Windows] Use dark title bar on dark system theme (#111042) 2022-09-09 22:23:59 +00:00
flutter_window.cpp [Windows] Address feedback for show window comment (#127998) 2023-05-31 23:42:54 +00:00
flutter_window.h Add Windows to the platform_channels example (#106754) 2022-06-30 14:54:07 +00:00
main.cpp [Windows] Hide app until first frame is drawn (#109816) 2022-08-30 14:26:21 +00:00
resource.h Add Windows to the platform_channels example (#106754) 2022-06-30 14:54:07 +00:00
runner.exe.manifest Add Windows to the platform_channels example (#106754) 2022-06-30 14:54:07 +00:00
Runner.rc [Windows] Improve version migration message (#127048) 2023-05-17 23:07:16 +00:00
utils.cpp [Windows] Fix signed/unsigned int comparison (#142341) 2024-02-07 00:09:57 +00:00
utils.h Add Windows to the platform_channels example (#106754) 2022-06-30 14:54:07 +00:00
win32_window.cpp Fix typos (#121171) 2023-02-23 19:43:21 +00:00
win32_window.h Fix typos (#121171) 2023-02-23 19:43:21 +00:00