git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2 1/1] [PATCH] mimgw: remove Compiler Warnings

From
PWPhillip Wood <phillip.wood123@gmail.com>
Date
Oct 10, 2024, 08:59 UTC
Message-ID
<e7646092-84e0-4210-88e9-98352e1f60e0@gmail.com>
In-Reply-To
<20241009171342.2354-2-soekkle@freenet.de>
Hi Sören
On 09/10/2024 18:13, Sören Krecker wrote:
> Remove some compiler warnings from msvc in compat/mingw.c for value truncation from 64 bit to 32 bit intigers.

Thanks for re-rolling, I think "Fix some compiler warnings" would be clearer than "Remove", also "integers" is misspelt. As Junio said we fold our commit messages at 72 characters. When I said it would be helpful to explain the choice of signed/unsigned I meant an explanation in the commit message, not code comments. I agree with Junio that the remaining ssize_t should be a size_t so the commit message could say something like

     Use size_t instead of int as all of the changed variables hold the
     result of strlen() or wcslen() which cannot be negative.

It would also be helpful to explain in the commit message the changes to _ssize_t

Show 5 quoted lines
> +#ifdef _WIN64
> +typedef __int64 _ssize_t;
> +#else
>   typedef long _ssize_t;
> +#endif // _AMD64

Please note that we do not use "//" comments so this should be "/* _WIN64 */" so that the comment matches the opening #ifdef

Thanks for working on this
Phillip
Previous: Junio C HamanoNext: Sören Krecker
Message 7 of 16 in “mimgw: remove Compiler Warnings”
  1. mimgw: remove Compiler WarningsSören Krecker, Oct 9, 2024
  2. Torsten BögershausenOct 9, 2024
  3. Phillip WoodOct 9, 2024
  4. mimgw: remove Compiler WarningsSören Krecker, Oct 9, 2024
  5. 1/1 [PATCH] mimgw: remove Compiler WarningsSören Krecker, Oct 9, 2024
  6. Junio C HamanoOct 9, 2024
  7. Phillip WoodOct 10, 2024
  8. [PATCH] mimgw: Remove Compiler WarningsSören Krecker, Oct 10, 2024
  9. Torsten BögershausenOct 10, 2024
  10. mingw.c: Fix complier warnings for a 64 bit msvcSören Krecker, Oct 12, 2024
  11. Torsten BögershausenOct 16, 2024
  12. Taylor BlauOct 16, 2024
  13. 0/1 mingw.c: Fix complier warnings for a 64 bit msvcSören Krecker, Oct 17, 2024
  14. 1/1 [PATCH] mingw.c: Fix complier warnings for a 64 bit msvcSören Krecker, Oct 17, 2024
  15. Taylor BlauOct 17, 2024
  16. Junio C HamanoOct 10, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.