On Mon, 2014-04-14 at 14:41 -0700, Linus Torvalds wrote:
> diff --git a/linux.c b/linux.c
> index ea0170dc89f8..03d0bfbf9670 100644
> --- a/linux.c
> +++ b/linux.c
> +     if (username && *username) {
> +             const char hostname[64];
> +             struct membuffer mb = { 0 };
> +             gethostname(hostname, sizeof(hostname));

clang seems to think this is naughty:

linux.c:32:15: warning: passing 'const char [64]' to parameter of type 'char *' 
discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
                gethostname(hostname, sizeof(hostname));
                            ^~~~~~~~
/usr/include/unistd.h:901:31: note: passing argument to parameter '__name' here
extern int gethostname (char *__name, size_t __len) __THROW __nonnull ((1));

                             ^
clang has a point...


/D

_______________________________________________
subsurface mailing list
subsurface@hohndel.org
http://lists.hohndel.org/cgi-bin/mailman/listinfo/subsurface

Reply via email to