bug-gnulib@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
From: Collin Funk <collin.funk1@gmail.com>
To: bug-gnulib@gnu.org
Subject: [PATCH] math: Silence -Winclude-next-absolute-path warning.
Date: Sat, 17 Feb 2024 00:36:44 -0800	[thread overview]
Message-ID: <fe1369b8-4457-4a4c-a520-d11f59f31e64@gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 618 bytes --]

Hello. When compiling gettext from master I get the following warning:

./math.h:46:2: warning: #include_next in file found relative to primary source file or found by absolute path; will search from start of include path [-Winclude-next-absolute-path]
   46 | #include_next <math.h>

I've attached a patch that seems to fix this. I based it off the following two commits:

https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=f4fccf8efdd09d5e38f49f6ae1962797ce3e8e9c
https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=2a5409cf2ac62ed273589c72bb8ae0031f06a219

Let me know if I missed anything. Thanks!

Collin

[-- Attachment #2: 0001-math-Silence-Winclude-next-absolute-path-warning.patch --]
[-- Type: text/x-patch, Size: 1222 bytes --]

From 269dfab932a01cfbbb5382b8955f06d065eea149 Mon Sep 17 00:00:00 2001
From: Collin Funk <collin.funk1@gmail.com>
Date: Sat, 17 Feb 2024 00:19:17 -0800
Subject: [PATCH] math: Silence -Winclude-next-absolute-path warning.

See commit f4fccf8efdd09d5e38f49f6ae1962797ce3e8e9c for more
information.
* lib/math.c: Write #include <math.h> instead of #include "math.h".

Copyright-paperwork-exempt: Yes
---
 ChangeLog  | 7 +++++++
 lib/math.c | 2 +-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 6a990dd0e8..8caa488c56 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2024-02-17  Collin Funk  <collin.funk1@gmail.com>
+
+	math: Silence -Winclude-next-absolute-path warning.
+	See commit f4fccf8efdd09d5e38f49f6ae1962797ce3e8e9c for more
+	information.
+	* lib/math.c: Write #include <math.h> instead of #include "math.h".
+
 2024-02-15  Bruno Haible  <bruno@clisp.org>
 
 	nstrftime: Optimize module dependencies.
diff --git a/lib/math.c b/lib/math.c
index 08f4103c3d..78da4d4aca 100644
--- a/lib/math.c
+++ b/lib/math.c
@@ -18,5 +18,5 @@
 #include <config.h>
 
 #define _GL_MATH_INLINE _GL_EXTERN_INLINE
-#include "math.h"
+#include <math.h>
 typedef int dummy;
-- 
2.39.2


             reply	other threads:[~2024-02-17  8:37 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-17  8:36 Collin Funk [this message]
2024-02-17 10:51 ` [PATCH] math: Silence -Winclude-next-absolute-path warning Bruno Haible
2024-02-17 12:26   ` Collin Funk
2024-02-17 13:17     ` Bruno Haible
2024-02-18 12:19     ` Bruno Haible
2024-02-18 12:44       ` syntax-check rule to silence " Bruno Haible
2024-02-18 20:12         ` Collin Funk
2024-02-18 20:33           ` Bruno Haible
2024-02-19  5:02             ` Jim Meyering
2024-02-19 18:11               ` Collin Funk
2024-02-19 18:32                 ` Jim Meyering
2024-02-19  8:45             ` Simon Josefsson via Gnulib discussion list
2024-02-19 20:39               ` Jim Meyering
2024-02-20 15:17               ` Bruno Haible
2024-02-20 20:23         ` Collin Funk
2024-02-20 20:49           ` Bruno Haible
2024-02-19  6:31       ` [PATCH] math: Silence " Paul Eggert
2024-02-19 11:03         ` Bruno Haible
2024-02-19 20:41           ` Paul Eggert
2024-02-19 21:24             ` Bruno Haible
2024-02-19 21:45               ` Paul Eggert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://lists.gnu.org/mailman/listinfo/bug-gnulib

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fe1369b8-4457-4a4c-a520-d11f59f31e64@gmail.com \
    --to=collin.funk1@gmail.com \
    --cc=bug-gnulib@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).