<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/64358>64358</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            -Wconversions warnings in libc code
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            libc
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
            lntue,
            michaelrj-google
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          frobtech
      </td>
    </tr>
</table>

<pre>
    https://reviews.llvm.org/D156630 enables `-Wconversion -Wno-sign-conversion` for compiling libc code. This today results in quite a few new warnings.  There are a few common patterns with the Linux syscall wrapper functions and errno propagation where some helper inlines to handle those patterns are probably worthwhile. In other places just explicit `static_cast<...>` should be used to express the explicit intent to shorten, but in some of those places the shortening might not actually be intended and the warnings are pointing to real changes that should be made. 

A couple of the cases are in math code that Tue should probably look at.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxck8FutLgShZ_GbEqNwKRJ94JFbnJbGmmWkf7lqDAFdsa4GLsI6bcfmU6nf80GJJfr-KtjH0zJTYGoU8f_Ka19kJWU1kq_Kq1nZyySjx-HiXnye-H4VuAqlmM3Ru6FjC16Hq6dFVmSal6Uvih9ifTpaEul959zyXFS-vJWH9u2qYAC9p4SqLY6_DIcPikmxwEOvwIfMszhsajaCkaOYHhenHdhAu96A4YHKuHdugTCA14hUlq9JHAB_lmdECCMtEGgDTaMwYUplQDvliIBxnvZ8DxzgAVFKIYEmxMLYgn-dGH9gnRNBr2HLeKyUIRxDUYchwQYBqAYA8MSecEJ8zJsu3zimcCSzx0ueBcoQ4LFMHgCsZzocWJmWSL32PsrbBzFbtZ5KuGPACyWIiweDSX4WJMAfS3eGSfZuiQozvxlMIlqXsuyVM3_s1vJ8uoH6AnWREM-mb6WSCntg_0ouCAUJJeT5SgUlH6Ffs2F2wQ83llvALn7e2u-htlNViCwABpZ0ftrPnJXHWjYDcodd_Nvg7ILkpuFIRJ6MBbDtGuj_AY-Y75dVb2p6uX2fQHD6-K_qQgMJrppugAzit1fxE3nfaW71o-znvlvQCmLoWuGc3PGgrq6PddVXT8fq8J2J43DsR3wfNJDreuxb8fx3DwPiFX7fBzawnW60k11qrSu9bmuyuOpfhrNSHg-Dy2dSD1VNKPzPy--cCmt1LVPzfFUeOzJp3vGXG--kxS7vP3Qr1NST5V3SR6RKcSJp-73jKSHoS48olCs0f8nf5MTu_al4VnpS1b8_h2WyB9kROnLzpeUvuyI_wYAAP__HpNlDw">