Fix gcc warnings in mono (#62684)
authorAdeel Mujahid <3840695+am11@users.noreply.github.com>
Sun, 12 Dec 2021 18:25:32 +0000 (20:25 +0200)
committerGitHub <noreply@github.com>
Sun, 12 Dec 2021 18:25:32 +0000 (13:25 -0500)
commitcf75830ce2ecd5efafbf39c5de319b2841d8666c
tree7bca294f3d278c0555276ab92743d4f6d97170d3
parentdaa2965c8d8205168cb7e60ce3e0c723ec817ab5
Fix gcc warnings in mono (#62684)

* Fix gcc warnings in mono

* Cleanup trailing whitespace in changeset files
```sh
# git remote add dotnet https://github.com/dotnet/runtime && git pull --rebase dotnet main

if uname 2>/dev/null | grep -q Darwin; then
    space=" "
fi

git show --name-only --pretty="" HEAD...dotnet/main |\
  xargs -I{} sh -c "test -f {} && sed -i$space'' 's/[[:space:]]*$//' {}"
```

* Enable warn-as-error by default; protect good state
13 files changed:
src/mono/mono.proj
src/mono/mono/component/debugger-agent.c
src/mono/mono/eglib/gunicode.c
src/mono/mono/metadata/object.c
src/mono/mono/metadata/sgen-mono.c
src/mono/mono/metadata/sgen-stw.c
src/mono/mono/metadata/threads.c
src/mono/mono/metadata/w32process-unix-default.c
src/mono/mono/mini/mini-amd64.h
src/mono/mono/mini/mini-x86.h
src/mono/mono/mini/trace.c
src/mono/mono/sgen/sgen-debug.c
src/mono/mono/utils/mono-threads.c