chiark / gitweb /
fix conversion error in stop.c
authorjschueller <julien.schueller@gmail.com>
Mon, 31 Aug 2015 09:27:19 +0000 (11:27 +0200)
committerjschueller <julien.schueller@gmail.com>
Mon, 31 Aug 2015 09:27:19 +0000 (11:27 +0200)
commitd88458176f694c7c38e2f75c7e3da9e65db6812c
tree022fe3ec1be3062e5251c089b7134d695b643022
parent857889e6df432e53978b4ddc83e0c90ffef52310
fix conversion error in stop.c

hi,

I got this error when compiling git head with gcc:

```
make[2]: Entering directory '/home/schueller/projects/nlopt/build/util'
/bin/sh ../libtool  --tag=CC   --mode=compile g++ -DHAVE_CONFIG_H -I. -I../../util -I..  -I../../api   -g -O2 -Wall -W -Wcast-qual -Wpointer-arith -Wcast-align -Wno-long-long -pedantic -Wshadow -Wwrite-strings -Wredundant-decls -Wundef -Wconversion -MT stop.lo -MD -MP -MF .deps/stop.Tpo -c -o stop.lo ../../util/stop.c
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../../util -I.. -I../../api -g -O2 -Wall -W -Wcast-qual -Wpointer-arith -Wcast-align -Wno-long-long -pedantic -Wshadow -Wwrite-strings -Wredundant-decls -Wundef -Wconversion -MT stop.lo -MD -MP -MF .deps/stop.Tpo -c ../../util/stop.c  -fPIC -DPIC -o .libs/stop.o
../../util/stop.c: In function ‘char* nlopt_vsprintf(char*, const char*, __va_list_tag*)’:
../../util/stop.c:151:20: error: invalid conversion from ‘void*’ to ‘char*’ [-fpermissive]
         p = realloc(p, len);
                    ^
Makefile:426: recipe for target 'stop.lo' failed
```
util/stop.c