Skip to content

Visual Studio: Fix several warnings and clean up a bit

Chun-wei Fan requested to merge fix-msvc-warnings into master

Hi,

This attempts to fix the following items that may pop up as warnings/errors and tries to clean things up a little bit:

  • girepository/cmph/brz.c: Avoid C4715 warnings, which is considered an error in later GLib releases
  • girepository/cmph/brz.c: Use the __ia64/__x86_64__ codepath on 64-bit Visual Studio builds too, since Windows is an LLP64 platform and Visual Studio does not define __ia64/__x86_64__ but does define _WIN64 on 64-bit builds. aarch64/ARM64 also assume this codepath as Windows 10 on ARM is still an LLP64 platform.
  • girepository/cmph/bdz.c: Remove Visual Studio 2012-specific hack and refine for-loop condition, as a minor cleanup.
  • giscanner/scannerparser.y: Include io.h on Windows, since close() is being used and unistd.h may not exist on Windows.

With blessings, thank you!

Edited by Chun-wei Fan

Merge request reports