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

[PATCH 0/1] grep: don't return an expression from pcre2_free()

From
Hans Jerry Illikainen <hji@dyntopia.com>
Date
Nov 27, 2019, 20:24 UTC
Message-ID
<20191127202411.4298-1-hji@dyntopia.com>

This is a simple one-line fix for a bug I ran into when enabling pedantic builds with DEVELOPER=1 and --with-libpcre. Previously, the void function pcre2_free() returned an expression. This commit changes that as per section 6.8.6.4 in C99 [1] and C11 [2]:

> A return statement with an expression shall not appear in a function
> whose return type is void.

[1] http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf [2] http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1548.pdf

Hans Jerry Illikainen (1):
  grep: don't return an expression from pcre2_free()
 grep.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 2.24.0.156.g00c62833a5

Next: Hans Jerry Illikainen
Message 1 of 2 in “grep: don't return an expression from pcre2_free()”
  1. 0/1 grep: don't return an expression from pcre2_free()Hans Jerry Illikainen, Nov 27, 2019
  2. 1/1 grep: don't return an expression from pcre2_free()Hans Jerry Illikainen, Nov 27, 2019

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.