This was basically a change in glibc to mark various routines as “must
check return value”, and fwrite is in the list, and because the standard
compilation options turn warnings into errors, this breaks the compllation.

I believe the change for fwrite was reverted in a later glibc, but that
wasn’t backported to all platforms.

The super-easy fix:

-        fwrite(key, 1, nkey, stderr);
+        if (fwrite(key, 1, nkey, stderr) != nkey) { /* unused result */ }

…a more proper fix would be either not using fwrite (use a loop around
printf or whatever), or checking the return value and doing something with
it. Really, though, the correct response to “couldn’t write this log entry”
is almost certainly “ignore error and keep on serving,” so the above is
probably even correct. And if you can’t write to your log then it’s not
like you could log the error, either… :)

The above (in memcached.c, around like 1274) will get it to build and run,
at any rate.

-j


On Mon, Aug 25, 2014 at 3:08 PM, <[email protected]> wrote:

>
> Comment #2 on issue 374 by [email protected]: A compile warning
>
> https://code.google.com/p/memcached/issues/detail?id=374
>
> I have the same issue on SuSE Enterprise Linux 11 SP3. Attempting to
> compile on s390x architecture.
>
> I was able to compile version 1.4.17, but nothing higher than that will
> compile.
>
> Perhaps incompatibility with an older gcc version?
>
>
> --
> You received this message because this project is configured to send all
> issue notifications to this address.
> You may adjust your notification preferences at:
> https://code.google.com/hosting/settings
>
> --
>
> ---You received this message because you are subscribed to the Google
> Groups "memcached" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"memcached" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to