From: Jeff Garzik <jeff@garzik.org>
To: Jim Meyering <jim@meyering.net>
Cc: Project Hail <hail-devel@vger.kernel.org>
Subject: Re: [PATCH hail] const-correctness tweaks
Date: Thu, 07 Oct 2010 02:00:43 -0400 [thread overview]
Message-ID: <4CAD620B.80705@garzik.org> (raw)
In-Reply-To: <87mxqro78a.fsf@meyering.net>
On 10/06/2010 08:07 AM, Jim Meyering wrote:
>
> Make write_cb callback's buffer parameter const, like all write-like
> functions.
> Give a few "char *" parameters the "const" attribute.
>
> Signed-off-by: Jim Meyering<meyering@redhat.com>
> ---
>
> It looks like most of hail's interfaces are const-correct,
> but one stood out because it provokes a warning when I tried to
> pass a const-correct write_cb function to hstor_get from iwhd:
>
> proxy.c:382: warning: passing argument 4 of 'hstor_get' from \
> incompatible pointer type
> /usr/include/hstor.h:173: note: expected \
> 'size_t (*)(void *, size_t, size_t, void *)' but argument is of type \
> 'size_t (*)(const void *, size_t, size_t, void *)'
>
> In case you feel comfortable fixing this, here's a patch:
>
>
> include/hstor.h | 4 ++--
> lib/hstor.c | 5 +++--
> lib/hutil.c | 2 +-
> 3 files changed, 6 insertions(+), 5 deletions(-)
This requires updating test/large-object.c in tabled, too. Would you
mind sending along that companion patch?
next prev parent reply other threads:[~2010-10-07 6:00 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-06 12:07 [PATCH hail] const-correctness tweaks Jim Meyering
2010-10-07 6:00 ` Jeff Garzik [this message]
2010-10-07 6:38 ` Jim Meyering
2010-10-19 22:24 ` Jeff Garzik
2010-10-20 8:00 ` Jim Meyering
2010-10-20 8:36 ` Jeff Garzik
2010-10-20 8:53 ` Jim Meyering
2010-10-23 1:49 ` Jeff Garzik
2010-10-23 3:01 ` Jeff Garzik
2010-10-23 6:47 ` Jim Meyering
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4CAD620B.80705@garzik.org \
--to=jeff@garzik.org \
--cc=hail-devel@vger.kernel.org \
--cc=jim@meyering.net \
/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