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

Re: [PATCH] xemit.c: fix a [-Wchar-subscripts] compiler warning

From
René Scharfe <l.s.r@web.de>
Date
May 26, 2016, 02:22 UTC
Message-ID
<57465DCC.9080809@web.de>
In-Reply-To
<57462FF3.4010705@ramsayjones.plus.com>
[sorry for duplicate]
Am 26.05.2016 um 01:06 schrieb Ramsay Jones:
Show 8 quoted lines
>
> While compiling on cygwin (x86_64), gcc complains thus:
>
>        CC xdiff/xemit.o
>    xdiff/xemit.c: In function ‘is_empty_rec’:
>    xdiff/xemit.c:163:2: warning: array subscript has type ‘char’ [-Wchar-subscripts]
>      while (len > 0 && isspace(*rec)) {
>      ^

Ah, it's not using our own isspace(), which works fine with signed chars, because it doesn't include git-compat-util.h. I'm spoilt by those char classifier macros that can be actually used with chars.. Thanks for catching!

René
Previous: Ramsay Jones
Message 2 of 2 in “xemit.c: fix a [-Wchar-subscripts] compiler warning”
  1. xemit.c: fix a [-Wchar-subscripts] compiler warningRamsay Jones, May 25, 2016
  2. René ScharfeMay 26, 2016

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.