[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: error: invalid use of void expression
From: |
Bruce Korb |
Subject: |
Re: error: invalid use of void expression |
Date: |
Fri, 04 Jan 2013 22:06:01 -0800 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0 |
On 01/04/13 18:25, Eric Blake wrote:
> On 01/04/2013 05:47 PM, Bruce Korb wrote:
>> You may have been thinking you were using "memcpy", but you were
>> using "bcopy" instead. Please apply the patch to md5.c. Thanks!
>
> Rather than fixing the call site of memcpy, we should instead fix the
> real bug, the fact that you are even doing *ifndef HAVE_MEMCPY and
> defining memcpy to bcopy() in the first place.
I am removing (have removed) md5.[ch] from the sharutils repo.
But I have a theory now: Long ago and far away, there used to
be a test for memcpy. Somewhere along the line, HAVE_MEMCPY
disappeared and sharutils kept working because bcopy works just fine.
Then I upgraded to gnulib's md5 and I hit a booby trap and
my $'^[ \t]*#[ \t]*define[ \t]+memcpy\>' re didn't find the define.
It is still ugly to nest functional functions into a single
line of code. But I don't care any more. The booby trap
lived in sharutils/lib/system.h along side a *LOT* of ancient
cruft.