bug-gnulib@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
From: Bruno Haible <bruno@clisp.org>
To: bug-gnulib@gnu.org
Subject: relocatable-prog: Fix compiler warning
Date: Sat, 04 Feb 2023 02:52:40 +0100	[thread overview]
Message-ID: <3004116.8K8DVpNF36@nimes> (raw)

This should fix a wrong use of 'const'. I saw a warning while building Reuben's
libpaper with --enable-relocatable.

2023-02-03  Bruno Haible  <bruno@clisp.org>

	relocatable-prog: Fix compiler warning.
	* lib/progreloc.c (full_read): Use a non-const pointer.

diff --git a/lib/progreloc.c b/lib/progreloc.c
index 8534fb08da..30b1f759b6 100644
--- a/lib/progreloc.c
+++ b/lib/progreloc.c
@@ -133,7 +133,7 @@ static size_t
 full_read (int fd, void *buf, size_t count)
   size_t total = 0;
-  const char *ptr = (const char *) buf;
+  char *ptr = (char *) buf;
   while (count > 0)

                 reply	other threads:[~2023-02-04  1:52 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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:

  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=3004116.8K8DVpNF36@nimes \
    --to=bruno@clisp.org \
    --cc=bug-gnulib@gnu.org \


* 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).