DCurrent / openbor

OpenBOR is the ultimate 2D side scrolling engine for beat em' ups, shooters, and more!
http://www.chronocrash.com
BSD 3-Clause "New" or "Revised" License
925 stars 124 forks source link

Compiling error #48

Closed ElonSatoshi closed 6 years ago

ElonSatoshi commented 6 years ago

I keep getting this error when compiling:

Compiling LINUX Port: openbor.c...
Compiling LINUX Port: openborscript.c...
Compiling LINUX Port: sdl/joysticks.c...
Compiling LINUX Port: sdl/control.c...
In file included from openborscript.c:36:0:
openborscript.c: In function ‘mapstrings_systemvariant’:
source/openborscript/scriptcommon.h:60:60: error: comparison between pointer and zero character constant [-Werror=pointer-compare]
             for(proplist_cursor = 0; LIST[proplist_cursor] != '\0'; proplist_cursor++){ \
                                                            ^
openborscript.c:977:5: note: in expansion of macro ‘MAPSTRINGS’
     MAPSTRINGS(varlist[0], svlist, _sv_the_end,
     ^~~~~~~~~~
openborscript.c:977:28: note: did you mean to dereference the pointer?
     MAPSTRINGS(varlist[0], svlist, _sv_the_end,
                            ^
source/openborscript/scriptcommon.h:60:38: note: in definition of macro ‘MAPSTRINGS’
             for(proplist_cursor = 0; LIST[proplist_cursor] != '\0'; proplist_cursor++){ \
                                      ^~~~
openborscript.c: In function ‘mapstrings_entityproperty’:
source/openborscript/scriptcommon.h:60:60: error: comparison between pointer and zero character constant [-Werror=pointer-compare]
             for(proplist_cursor = 0; LIST[proplist_cursor] != '\0'; proplist_cursor++){ \
                                                            ^
openborscript.c:2991:5: note: in expansion of macro ‘MAPSTRINGS’
     MAPSTRINGS(varlist[1], eplist, _ep_the_end,
     ^~~~~~~~~~
openborscript.c:2991:28: note: did you mean to dereference the pointer?
     MAPSTRINGS(varlist[1], eplist, _ep_the_end,
                            ^
source/openborscript/scriptcommon.h:60:38: note: in definition of macro ‘MAPSTRINGS’
             for(proplist_cursor = 0; LIST[proplist_cursor] != '\0'; proplist_cursor++){ \
                                      ^~~~
source/openborscript/scriptcommon.h:60:60: error: comparison between pointer and zero character constant [-Werror=pointer-compare]
             for(proplist_cursor = 0; LIST[proplist_cursor] != '\0'; proplist_cursor++){ \
                                                            ^
openborscript.c:3013:9: note: in expansion of macro ‘MAPSTRINGS’
         MAPSTRINGS(varlist[2], eplist_aiflag, _ep_aiflag_the_end,
         ^~~~~~~~~~
openborscript.c:3013:32: note: did you mean to dereference the pointer?
         MAPSTRINGS(varlist[2], eplist_aiflag, _ep_aiflag_the_end,
                                ^
source/openborscript/scriptcommon.h:60:38: note: in definition of macro ‘MAPSTRINGS’
             for(proplist_cursor = 0; LIST[proplist_cursor] != '\0'; proplist_cursor++){ \
                                      ^~~~
source/openborscript/scriptcommon.h:60:60: error: comparison between pointer and zero character constant [-Werror=pointer-compare]
             for(proplist_cursor = 0; LIST[proplist_cursor] != '\0'; proplist_cursor++){ \
                                                            ^
openborscript.c:3023:13: note: in expansion of macro ‘MAPSTRINGS’
             MAPSTRINGS(varlist[3], proplist_defense, _ep_defense_the_end,
             ^~~~~~~~~~
openborscript.c:3023:36: note: did you mean to dereference the pointer?
             MAPSTRINGS(varlist[3], proplist_defense, _ep_defense_the_end,
                                    ^
source/openborscript/scriptcommon.h:60:38: note: in definition of macro ‘MAPSTRINGS’
             for(proplist_cursor = 0; LIST[proplist_cursor] != '\0'; proplist_cursor++){ \
                                      ^~~~
source/openborscript/scriptcommon.h:60:60: error: comparison between pointer and zero character constant [-Werror=pointer-compare]
             for(proplist_cursor = 0; LIST[proplist_cursor] != '\0'; proplist_cursor++){ \
                                                            ^
openborscript.c:3031:9: note: in expansion of macro ‘MAPSTRINGS’
         MAPSTRINGS(varlist[2], proplist_dot, _ep_dot_the_end,
         ^~~~~~~~~~
openborscript.c:3031:32: note: did you mean to dereference the pointer?
         MAPSTRINGS(varlist[2], proplist_dot, _ep_dot_the_end,
                                ^
source/openborscript/scriptcommon.h:60:38: note: in definition of macro ‘MAPSTRINGS’
             for(proplist_cursor = 0; LIST[proplist_cursor] != '\0'; proplist_cursor++){ \
                                      ^~~~
source/openborscript/scriptcommon.h:60:60: error: comparison between pointer and zero character constant [-Werror=pointer-compare]
             for(proplist_cursor = 0; LIST[proplist_cursor] != '\0'; proplist_cursor++){ \
                                                            ^
openborscript.c:3038:9: note: in expansion of macro ‘MAPSTRINGS’
         MAPSTRINGS(varlist[2], proplist_edelay, _ep_edelay_the_end,
         ^~~~~~~~~~
openborscript.c:3038:32: note: did you mean to dereference the pointer?
         MAPSTRINGS(varlist[2], proplist_edelay, _ep_edelay_the_end,
                                ^
source/openborscript/scriptcommon.h:60:38: note: in definition of macro ‘MAPSTRINGS’
             for(proplist_cursor = 0; LIST[proplist_cursor] != '\0'; proplist_cursor++){ \
                                      ^~~~
source/openborscript/scriptcommon.h:60:60: error: comparison between pointer and zero character constant [-Werror=pointer-compare]
             for(proplist_cursor = 0; LIST[proplist_cursor] != '\0'; proplist_cursor++){ \
                                                            ^
openborscript.c:3045:9: note: in expansion of macro ‘MAPSTRINGS’
         MAPSTRINGS(varlist[2], proplist_energycost, _ep_energycost_the_end,
         ^~~~~~~~~~
openborscript.c:3045:32: note: did you mean to dereference the pointer?
         MAPSTRINGS(varlist[2], proplist_energycost, _ep_energycost_the_end,
                                ^
source/openborscript/scriptcommon.h:60:38: note: in definition of macro ‘MAPSTRINGS’
             for(proplist_cursor = 0; LIST[proplist_cursor] != '\0'; proplist_cursor++){ \
                                      ^~~~
source/openborscript/scriptcommon.h:60:60: error: comparison between pointer and zero character constant [-Werror=pointer-compare]
             for(proplist_cursor = 0; LIST[proplist_cursor] != '\0'; proplist_cursor++){ \
                                                            ^
openborscript.c:3052:9: note: in expansion of macro ‘MAPSTRINGS’
         MAPSTRINGS(varlist[2], proplist_flash, _ep_flash_the_end,
         ^~~~~~~~~~
openborscript.c:3052:32: note: did you mean to dereference the pointer?
         MAPSTRINGS(varlist[2], proplist_flash, _ep_flash_the_end,
                                ^
source/openborscript/scriptcommon.h:60:38: note: in definition of macro ‘MAPSTRINGS’
             for(proplist_cursor = 0; LIST[proplist_cursor] != '\0'; proplist_cursor++){ \
                                      ^~~~
source/openborscript/scriptcommon.h:60:60: error: comparison between pointer and zero character constant [-Werror=pointer-compare]
             for(proplist_cursor = 0; LIST[proplist_cursor] != '\0'; proplist_cursor++){ \
                                                            ^
openborscript.c:3059:9: note: in expansion of macro ‘MAPSTRINGS’
         MAPSTRINGS(varlist[2], proplist_icon, _ep_icon_the_end,
         ^~~~~~~~~~
openborscript.c:3059:32: note: did you mean to dereference the pointer?
         MAPSTRINGS(varlist[2], proplist_icon, _ep_icon_the_end,
                                ^
source/openborscript/scriptcommon.h:60:38: note: in definition of macro ‘MAPSTRINGS’
             for(proplist_cursor = 0; LIST[proplist_cursor] != '\0'; proplist_cursor++){ \
                                      ^~~~
source/openborscript/scriptcommon.h:60:60: error: comparison between pointer and zero character constant [-Werror=pointer-compare]
             for(proplist_cursor = 0; LIST[proplist_cursor] != '\0'; proplist_cursor++){ \
                                                            ^
openborscript.c:3067:9: note: in expansion of macro ‘MAPSTRINGS’
         MAPSTRINGS(varlist[2], proplist_knockdowncount, _ep_knockdowncount_the_end,
         ^~~~~~~~~~
openborscript.c:3067:32: note: did you mean to dereference the pointer?
         MAPSTRINGS(varlist[2], proplist_knockdowncount, _ep_knockdowncount_the_end,
                                ^
source/openborscript/scriptcommon.h:60:38: note: in definition of macro ‘MAPSTRINGS’
             for(proplist_cursor = 0; LIST[proplist_cursor] != '\0'; proplist_cursor++){ \
                                      ^~~~
source/openborscript/scriptcommon.h:60:60: error: comparison between pointer and zero character constant [-Werror=pointer-compare]
             for(proplist_cursor = 0; LIST[proplist_cursor] != '\0'; proplist_cursor++){ \
                                                            ^
openborscript.c:3074:9: note: in expansion of macro ‘MAPSTRINGS’
         MAPSTRINGS(varlist[2], proplist_landframe, _ep_landframe_the_end,
         ^~~~~~~~~~
openborscript.c:3074:32: note: did you mean to dereference the pointer?
         MAPSTRINGS(varlist[2], proplist_landframe, _ep_landframe_the_end,
                                ^
source/openborscript/scriptcommon.h:60:38: note: in definition of macro ‘MAPSTRINGS’
             for(proplist_cursor = 0; LIST[proplist_cursor] != '\0'; proplist_cursor++){ \
                                      ^~~~
source/openborscript/scriptcommon.h:60:60: error: comparison between pointer and zero character constant [-Werror=pointer-compare]
             for(proplist_cursor = 0; LIST[proplist_cursor] != '\0'; proplist_cursor++){ \
                                                            ^
openborscript.c:3081:9: note: in expansion of macro ‘MAPSTRINGS’
         MAPSTRINGS(varlist[2], proplist_maps, _ep_maps_the_end,
         ^~~~~~~~~~
openborscript.c:3081:32: note: did you mean to dereference the pointer?
         MAPSTRINGS(varlist[2], proplist_maps, _ep_maps_the_end,
                                ^
source/openborscript/scriptcommon.h:60:38: note: in definition of macro ‘MAPSTRINGS’
             for(proplist_cursor = 0; LIST[proplist_cursor] != '\0'; proplist_cursor++){ \
                                      ^~~~
source/openborscript/scriptcommon.h:60:60: error: comparison between pointer and zero character constant [-Werror=pointer-compare]
             for(proplist_cursor = 0; LIST[proplist_cursor] != '\0'; proplist_cursor++){ \
                                                            ^
openborscript.c:3088:9: note: in expansion of macro ‘MAPSTRINGS’
         MAPSTRINGS(varlist[2], proplist_range, _ep_range_the_end,
         ^~~~~~~~~~
openborscript.c:3088:32: note: did you mean to dereference the pointer?
         MAPSTRINGS(varlist[2], proplist_range, _ep_range_the_end,
                                ^
source/openborscript/scriptcommon.h:60:38: note: in definition of macro ‘MAPSTRINGS’
             for(proplist_cursor = 0; LIST[proplist_cursor] != '\0'; proplist_cursor++){ \
                                      ^~~~
source/openborscript/scriptcommon.h:60:60: error: comparison between pointer and zero character constant [-Werror=pointer-compare]
             for(proplist_cursor = 0; LIST[proplist_cursor] != '\0'; proplist_cursor++){ \
                                                            ^
openborscript.c:3095:9: note: in expansion of macro ‘MAPSTRINGS’
         MAPSTRINGS(varlist[2], proplist_running, _ep_running_the_end,
         ^~~~~~~~~~
openborscript.c:3095:32: note: did you mean to dereference the pointer?
         MAPSTRINGS(varlist[2], proplist_running, _ep_running_the_end,
                                ^
source/openborscript/scriptcommon.h:60:38: note: in definition of macro ‘MAPSTRINGS’
             for(proplist_cursor = 0; LIST[proplist_cursor] != '\0'; proplist_cursor++){ \
                                      ^~~~
source/openborscript/scriptcommon.h:60:60: error: comparison between pointer and zero character constant [-Werror=pointer-compare]
             for(proplist_cursor = 0; LIST[proplist_cursor] != '\0'; proplist_cursor++){ \
                                                            ^
openborscript.c:3103:9: note: in expansion of macro ‘MAPSTRINGS’
         MAPSTRINGS(varlist[2], proplist_spritea, _ep_spritea_the_end,
         ^~~~~~~~~~
openborscript.c:3103:32: note: did you mean to dereference the pointer?
         MAPSTRINGS(varlist[2], proplist_spritea, _ep_spritea_the_end,
                                ^
source/openborscript/scriptcommon.h:60:38: note: in definition of macro ‘MAPSTRINGS’
             for(proplist_cursor = 0; LIST[proplist_cursor] != '\0'; proplist_cursor++){ \
                                      ^~~~
source/openborscript/scriptcommon.h:60:60: error: comparison between pointer and zero character constant [-Werror=pointer-compare]
             for(proplist_cursor = 0; LIST[proplist_cursor] != '\0'; proplist_cursor++){ \
                                                            ^
openborscript.c:3110:9: note: in expansion of macro ‘MAPSTRINGS’
         MAPSTRINGS(varlist[2], proplist_staydown, _ep_running_the_end,
         ^~~~~~~~~~
openborscript.c:3110:32: note: did you mean to dereference the pointer?
         MAPSTRINGS(varlist[2], proplist_staydown, _ep_running_the_end,
                                ^
source/openborscript/scriptcommon.h:60:38: note: in definition of macro ‘MAPSTRINGS’
             for(proplist_cursor = 0; LIST[proplist_cursor] != '\0'; proplist_cursor++){ \
                                      ^~~~
source/openborscript/scriptcommon.h:60:60: error: comparison between pointer and zero character constant [-Werror=pointer-compare]
             for(proplist_cursor = 0; LIST[proplist_cursor] != '\0'; proplist_cursor++){ \
                                                            ^
openborscript.c:3122:13: note: in expansion of macro ‘MAPSTRINGS’
             MAPSTRINGS(varlist[i], proplist_hostile_candamage, _ep_hcd_the_end,
             ^~~~~~~~~~
openborscript.c:3122:36: note: did you mean to dereference the pointer?
             MAPSTRINGS(varlist[i], proplist_hostile_candamage, _ep_hcd_the_end,
                                    ^
source/openborscript/scriptcommon.h:60:38: note: in definition of macro ‘MAPSTRINGS’
             for(proplist_cursor = 0; LIST[proplist_cursor] != '\0'; proplist_cursor++){ \
                                      ^~~~
source/openborscript/scriptcommon.h:60:60: error: comparison between pointer and zero character constant [-Werror=pointer-compare]
             for(proplist_cursor = 0; LIST[proplist_cursor] != '\0'; proplist_cursor++){ \
                                                            ^
openborscript.c:3135:9: note: in expansion of macro ‘MAPSTRINGS’
         MAPSTRINGS(varlist[2], proplist_takeaction, _ep_ta_the_end,
         ^~~~~~~~~~
openborscript.c:3135:32: note: did you mean to dereference the pointer?
         MAPSTRINGS(varlist[2], proplist_takeaction, _ep_ta_the_end,
                                ^
source/openborscript/scriptcommon.h:60:38: note: in definition of macro ‘MAPSTRINGS’
             for(proplist_cursor = 0; LIST[proplist_cursor] != '\0'; proplist_cursor++){ \
                                      ^~~~
source/openborscript/scriptcommon.h:60:60: error: comparison between pointer and zero character constant [-Werror=pointer-compare]
             for(proplist_cursor = 0; LIST[proplist_cursor] != '\0'; proplist_cursor++){ \
                                                            ^
openborscript.c:3142:9: note: in expansion of macro ‘MAPSTRINGS’
         MAPSTRINGS(varlist[2], proplist_think, _ep_th_the_end,
         ^~~~~~~~~~
openborscript.c:3142:32: note: did you mean to dereference the pointer?
         MAPSTRINGS(varlist[2], proplist_think, _ep_th_the_end,
                                ^
source/openborscript/scriptcommon.h:60:38: note: in definition of macro ‘MAPSTRINGS’
             for(proplist_cursor = 0; LIST[proplist_cursor] != '\0'; proplist_cursor++){ \
                                      ^~~~
openborscript.c: In function ‘mapstrings_playerproperty’:
source/openborscript/scriptcommon.h:60:60: error: comparison between pointer and zero character constant [-Werror=pointer-compare]
             for(proplist_cursor = 0; LIST[proplist_cursor] != '\0'; proplist_cursor++){ \
                                                            ^
openborscript.c:7301:5: note: in expansion of macro ‘MAPSTRINGS’
     MAPSTRINGS(varlist[1], proplist, _pp_the_end,
     ^~~~~~~~~~
openborscript.c:7301:28: note: did you mean to dereference the pointer?
     MAPSTRINGS(varlist[1], proplist, _pp_the_end,
                            ^
source/openborscript/scriptcommon.h:60:38: note: in definition of macro ‘MAPSTRINGS’
             for(proplist_cursor = 0; LIST[proplist_cursor] != '\0'; proplist_cursor++){ \
                                      ^~~~
openborscript.c: In function ‘mapstrings_setspawnentry’:
source/openborscript/scriptcommon.h:60:60: error: comparison between pointer and zero character constant [-Werror=pointer-compare]
             for(proplist_cursor = 0; LIST[proplist_cursor] != '\0'; proplist_cursor++){ \
                                                            ^
openborscript.c:9346:5: note: in expansion of macro ‘MAPSTRINGS’
     MAPSTRINGS(varlist[0], proplist, _sse_the_end,
     ^~~~~~~~~~
openborscript.c:9346:28: note: did you mean to dereference the pointer?
     MAPSTRINGS(varlist[0], proplist, _sse_the_end,
                            ^
source/openborscript/scriptcommon.h:60:38: note: in definition of macro ‘MAPSTRINGS’
             for(proplist_cursor = 0; LIST[proplist_cursor] != '\0'; proplist_cursor++){ \
                                      ^~~~
openborscript.c: In function ‘mapstrings_playerkeys’:
source/openborscript/scriptcommon.h:60:60: error: comparison between pointer and zero character constant [-Werror=pointer-compare]
             for(proplist_cursor = 0; LIST[proplist_cursor] != '\0'; proplist_cursor++){ \
                                                            ^
openborscript.c:9948:9: note: in expansion of macro ‘MAPSTRINGS’
         MAPSTRINGS(varlist[i], proplist, _pk_the_end,
         ^~~~~~~~~~
openborscript.c:9948:32: note: did you mean to dereference the pointer?
         MAPSTRINGS(varlist[i], proplist, _pk_the_end,
                                ^
source/openborscript/scriptcommon.h:60:38: note: in definition of macro ‘MAPSTRINGS’
             for(proplist_cursor = 0; LIST[proplist_cursor] != '\0'; proplist_cursor++){ \
                                      ^~~~
Compiling LINUX Port: sdl/sblaster.c...
openborscript.c: In function ‘mapstrings_textobjproperty’:
source/openborscript/scriptcommon.h:60:60: error: comparison between pointer and zero character constant [-Werror=pointer-compare]
             for(proplist_cursor = 0; LIST[proplist_cursor] != '\0'; proplist_cursor++){ \
                                                            ^
openborscript.c:10565:5: note: in expansion of macro ‘MAPSTRINGS’
     MAPSTRINGS(varlist[1], proplist, _top_the_end,
     ^~~~~~~~~~
openborscript.c:10565:28: note: did you mean to dereference the pointer?
     MAPSTRINGS(varlist[1], proplist, _top_the_end,
                            ^
source/openborscript/scriptcommon.h:60:38: note: in definition of macro ‘MAPSTRINGS’
             for(proplist_cursor = 0; LIST[proplist_cursor] != '\0'; proplist_cursor++){ \
                                      ^~~~
openborscript.c: In function ‘mapstrings_layerproperty’:
source/openborscript/scriptcommon.h:60:60: error: comparison between pointer and zero character constant [-Werror=pointer-compare]
             for(proplist_cursor = 0; LIST[proplist_cursor] != '\0'; proplist_cursor++){ \
                                                            ^
openborscript.c:10984:5: note: in expansion of macro ‘MAPSTRINGS’
     MAPSTRINGS(varlist[0], typelist, _glt_the_end,
     ^~~~~~~~~~
openborscript.c:10984:28: note: did you mean to dereference the pointer?
     MAPSTRINGS(varlist[0], typelist, _glt_the_end,
                            ^
source/openborscript/scriptcommon.h:60:38: note: in definition of macro ‘MAPSTRINGS’
             for(proplist_cursor = 0; LIST[proplist_cursor] != '\0'; proplist_cursor++){ \
                                      ^~~~
source/openborscript/scriptcommon.h:60:60: error: comparison between pointer and zero character constant [-Werror=pointer-compare]
             for(proplist_cursor = 0; LIST[proplist_cursor] != '\0'; proplist_cursor++){ \
                                                            ^
openborscript.c:10986:5: note: in expansion of macro ‘MAPSTRINGS’
     MAPSTRINGS(varlist[2], proplist, _glp_the_end,
     ^~~~~~~~~~
openborscript.c:10986:28: note: did you mean to dereference the pointer?
     MAPSTRINGS(varlist[2], proplist, _glp_the_end,
                            ^
source/openborscript/scriptcommon.h:60:38: note: in definition of macro ‘MAPSTRINGS’
             for(proplist_cursor = 0; LIST[proplist_cursor] != '\0'; proplist_cursor++){ \
                                      ^~~~
openborscript.c: In function ‘mapstrings_drawmethodproperty’:
source/openborscript/scriptcommon.h:60:60: error: comparison between pointer and zero character constant [-Werror=pointer-compare]
             for(proplist_cursor = 0; LIST[proplist_cursor] != '\0'; proplist_cursor++){ \
                                                            ^
openborscript.c:12125:5: note: in expansion of macro ‘MAPSTRINGS’
     MAPSTRINGS(varlist[1], proplist, _dm_the_end,
     ^~~~~~~~~~
openborscript.c:12125:28: note: did you mean to dereference the pointer?
     MAPSTRINGS(varlist[1], proplist, _dm_the_end,
                            ^
source/openborscript/scriptcommon.h:60:38: note: in definition of macro ‘MAPSTRINGS’
             for(proplist_cursor = 0; LIST[proplist_cursor] != '\0'; proplist_cursor++){ \
                                      ^~~~
openborscript.c: In function ‘mapstrings_gfxproperty’:
source/openborscript/scriptcommon.h:60:60: error: comparison between pointer and zero character constant [-Werror=pointer-compare]
             for(proplist_cursor = 0; LIST[proplist_cursor] != '\0'; proplist_cursor++){ \
                                                            ^
openborscript.c:13658:5: note: in expansion of macro ‘MAPSTRINGS’
     MAPSTRINGS(varlist[1], proplist, _gfx_the_end,
     ^~~~~~~~~~
openborscript.c:13658:28: note: did you mean to dereference the pointer?
     MAPSTRINGS(varlist[1], proplist, _gfx_the_end,
                            ^
source/openborscript/scriptcommon.h:60:38: note: in definition of macro ‘MAPSTRINGS’
             for(proplist_cursor = 0; LIST[proplist_cursor] != '\0'; proplist_cursor++){ \
                                      ^~~~
Compiling LINUX Port: sdl/timer.c...
Compiling LINUX Port: sdl/sdlport.c...
Compiling LINUX Port: sdl/video.c...
Compiling LINUX Port: sdl/videocommon.c...
Compiling LINUX Port: sdl/threads.c...
Compiling LINUX Port: sdl/menu.c...
Compiling LINUX Port: sdl/opengl.c...
cc1: all warnings being treated as errors
Compiling LINUX Port: sdl/loadgl.c...
Compiling LINUX Port: source/adpcmlib/adpcm.c...
make: *** [Makefile:658: openborscript.o] Error 1
make: *** Waiting for unfinished jobs....

Removing All LINUX Files...
Done!

I've tried different versions of gcc, from 7.3.0 to 7.3.1+20180406. I still get this error. My OS is Parabola Linux. What do I do? What other information do I need to specify?

DCurrent commented 6 years ago

Think I see the problem, will try to get a fix in today.

ElonSatoshi commented 6 years ago

Thank you :)

DCurrent commented 6 years ago

Get the latest master and try again, should be fixed.

ElonSatoshi commented 6 years ago

I see a new error now :(

$ ./build.sh 4 amd64
-------------------------------------------------------
OpenBOR v3.0 Build 5083 - http://www.ChronoCrash.com

All rights reserved.
See LICENSE and README within OpenBOR root for details.

Copyright (c) 2004 - 2017 OpenBOR Team
-------------------------------------------------------
-------------------------------------------------------
   Linux amd64 SDK (x86_64-pc-linux-gnu) Environment Loaded!
-------------------------------------------------------

Removing All LINUX Files...
Done!

Compiling LINUX Port: openbor.c...
Compiling LINUX Port: openborscript.c...
Compiling LINUX Port: sdl/joysticks.c...
Compiling LINUX Port: sdl/control.c...
Compiling LINUX Port: sdl/sblaster.c...
Compiling LINUX Port: sdl/timer.c...
Compiling LINUX Port: sdl/sdlport.c...
Compiling LINUX Port: sdl/video.c...
Compiling LINUX Port: sdl/videocommon.c...
Compiling LINUX Port: sdl/threads.c...
Compiling LINUX Port: sdl/menu.c...
Compiling LINUX Port: sdl/opengl.c...
Compiling LINUX Port: sdl/loadgl.c...
Compiling LINUX Port: source/adpcmlib/adpcm.c...
Compiling LINUX Port: source/gfxlib/2xSaI.c...
Compiling LINUX Port: source/gfxlib/bilinear.c...
Compiling LINUX Port: source/gfxlib/dotmatrix.c...
Compiling LINUX Port: source/gfxlib/gfx.c...
Compiling LINUX Port: source/gfxlib/hq2x.c...
Compiling LINUX Port: source/gfxlib/scale2x.c...
Compiling LINUX Port: source/gfxlib/scanline.c...
Compiling LINUX Port: source/gfxlib/simple2x.c...
Compiling LINUX Port: source/gfxlib/tv2x.c...
Compiling LINUX Port: source/gamelib/draw.c...
Compiling LINUX Port: source/gamelib/draw16.c...
Compiling LINUX Port: source/gamelib/draw32.c...
Compiling LINUX Port: source/gamelib/font.c...
Compiling LINUX Port: source/gamelib/translation.c...
Compiling LINUX Port: source/gamelib/anigif.c...
Compiling LINUX Port: source/gamelib/bitmap.c...
Compiling LINUX Port: source/gamelib/screen.c...
Compiling LINUX Port: source/gamelib/screen16.c...
Compiling LINUX Port: source/gamelib/screen32.c...
Compiling LINUX Port: source/gamelib/loadimg.c...
Compiling LINUX Port: source/gamelib/palette.c...
Compiling LINUX Port: source/gamelib/packfile.c...
Compiling LINUX Port: source/gamelib/filecache.c...
Compiling LINUX Port: source/gamelib/pixelformat.c...
Compiling LINUX Port: source/gamelib/soundmix.c...
Compiling LINUX Port: source/gamelib/spriteq.c...
Compiling LINUX Port: source/gamelib/sprite.c...
Compiling LINUX Port: source/gamelib/spritex8p16.c...
Compiling LINUX Port: source/gamelib/spritex8p32.c...
Compiling LINUX Port: source/gamelib/commands.c...
Compiling LINUX Port: source/gamelib/models.c...
Compiling LINUX Port: source/gamelib/transform.c...
Compiling LINUX Port: source/gamelib/filters.c...
Compiling LINUX Port: source/stringptr.c...
Compiling LINUX Port: source/utils.c...
Compiling LINUX Port: source/stristr.c...
Compiling LINUX Port: source/omath.c...
Compiling LINUX Port: source/scriptlib/StackedSymbolTable.c...
Compiling LINUX Port: source/scriptlib/ScriptVariant.c...
Compiling LINUX Port: source/scriptlib/SymbolTable.c...
Compiling LINUX Port: source/scriptlib/Instruction.c...
Compiling LINUX Port: source/scriptlib/Interpreter.c...
Compiling LINUX Port: source/scriptlib/ImportCache.c...
Compiling LINUX Port: source/scriptlib/ParserSet.c...
Compiling LINUX Port: source/scriptlib/Parser.c...
Compiling LINUX Port: source/scriptlib/Lexer.c...
Compiling LINUX Port: source/scriptlib/Stack.c...
Compiling LINUX Port: source/scriptlib/List.c...
source/scriptlib/Parser.c: In function ‘Parser_Unary_expr’:
source/scriptlib/Parser.c:1807:30: error: ‘sprintf’ may write a terminating nul past the end of the destination [-Werror=format-overflow=]
             sprintf(buf, "-%s", pInstruction->theToken->theSource);
                              ^
source/scriptlib/Parser.c:1807:13: note: ‘sprintf’ output between 2 and 129 bytes into a destination of size 128
             sprintf(buf, "-%s", pInstruction->theToken->theSource);
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
source/scriptlib/Parser.c:1834:30: error: ‘sprintf’ may write a terminating nul past the end of the destination [-Werror=format-overflow=]
             sprintf(buf, "!%s", pInstruction->theToken->theSource);
                              ^
source/scriptlib/Parser.c:1834:13: note: ‘sprintf’ output between 2 and 129 bytes into a destination of size 128
             sprintf(buf, "!%s", pInstruction->theToken->theSource);
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Compiling LINUX Port: source/preprocessorlib/pp_lexer.c...
cc1: all warnings being treated as errors
make: *** [Makefile:658: source/scriptlib/Parser.o] Error 1
make: *** Waiting for unfinished jobs....

Removing All LINUX Files...
Done!
DCurrent commented 6 years ago

The problem this time is the Linux compiler is stupid. That code has been in place for at least three years and never caused any problems before. I'll see what I can do though.

DCurrent commented 6 years ago

All right. Try latest. It's a kludge fix, but I want to see if my hunch is right.

rofl0r commented 6 years ago

instead of trying to add kludge fixes, i'd suggest using git bisect to find the commit that introduced the error, so one can properly reason how the bug came into existence to begin with and can develop an adequate fix or revert the bad commit.

Plombo commented 6 years ago

In this case, it doesn't look like any commit introduced the error -- it's just a new warning on old code introduced by a new compiler version, which turns into an error because we compile with -Werror. It happens every once in a while.