Jdesk / memcached

Automatically exported from code.google.com/p/memcached
0 stars 0 forks source link

compile errors: array subscript has type 'char' #111

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
On Solaris 9-sparc:

$ ./configure --with-libevent=/opt/local
$ make
[...]
gcc -std=gnu99 -DHAVE_CONFIG_H -I.  -DNDEBUG -I/opt/local/include   -g -O2
-pthread -Wall -Werror -pedantic -Wmissing-prototypes
-Wmissing-declarations -Wredundant-decls -MT memcached-util.o -MD -MP -MF
.deps/memcached-util.Tpo -c -o memcached-util.o `test -f 'util.c' || echo
'./'`util.c
cc1: warnings being treated as errors
util.c: In function ‘safe_strtoull’:
util.c:19: warning: array subscript has type ‘char’
util.c: In function ‘safe_strtoll’:
util.c:42: warning: array subscript has type ‘char’
util.c: In function ‘safe_strtoul’:
util.c:62: warning: array subscript has type ‘char’
util.c: In function ‘safe_strtol’:
util.c:86: warning: array subscript has type ‘char’
make[2]: *** [memcached-util.o] Error 1

$ gcc --version
gcc (GCC) 4.2.4
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Original issue reported on code.google.com by sel...@gmail.com on 7 Dec 2009 at 8:27

GoogleCodeExporter commented 9 years ago
This is for memcached 1.4.4

Original comment by sel...@gmail.com on 7 Dec 2009 at 8:41

GoogleCodeExporter commented 9 years ago
This occurs in Cygwin as well.  It occurs with at least 1.4.4 1.4.3.

Original comment by brandon....@gmail.com on 23 Dec 2009 at 3:34

GoogleCodeExporter commented 9 years ago
can you configure with CFLAGS=-save-temps then attach util.i ?  I think this is 
related to the isspace() macro.

Original comment by lind...@inuus.com on 29 Dec 2009 at 6:12

GoogleCodeExporter commented 9 years ago
I have the same problem. util.i attached is from a Solaris9/sparc system. 

Original comment by ptiq...@gmail.com on 29 Dec 2009 at 8:18

Attachments:

GoogleCodeExporter commented 9 years ago
fix available in my git repo..

http://github.com/lindner/memcached

Original comment by lind...@inuus.com on 2 Jan 2010 at 5:49

GoogleCodeExporter commented 9 years ago
Confirmed fixed here. memcached 1.4.4 now compiles on Sol9/sparc with no errors 
with
this change to util.c. 

Original comment by ptiq...@gmail.com on 7 Jan 2010 at 10:36

GoogleCodeExporter commented 9 years ago

Original comment by trond.no...@gmail.com on 11 Nov 2010 at 12:03

GoogleCodeExporter commented 9 years ago
here is the answer http://archive.cnblogs.com/a/1888446/.

Original comment by gaoya...@gmail.com on 14 Jul 2011 at 7:31