fix lot of gcc reported issues

This commit is contained in:
Ondřej Novák 2025-01-27 19:32:15 +01:00
parent 669f72908e
commit b6c5658b48
20 changed files with 493 additions and 334 deletions

View file

@ -263,10 +263,10 @@ static __inline int rangrnd(int a, int b) {return rnd(b-a+1)+a;}
#define MAX_HLAD(x) (((x)->vlastnosti[VLS_MAXHIT]/2+2*24)*HODINA)
#define MAX_ZIZEN(x) (((x)->vlastnosti[VLS_MAXHIT]/3+24)*HODINA)
#define concat(c,s1,s2) \
c=alloca(strlen(s1)+strlen(s2)+1);\
strcpy(c,s1);\
strcat(c,s2)
#define concat(c,s1,s2) c=strcat(strcpy((char *)alloca(strlen(s1)+strlen(s2)+1),s1),s2)
#define concat_r(c,s1,s2) strcat(strcpy((char *)alloca(strlen(s1)+strlen(s2)+1),s1),s2)
#define get_ap(vls) (((vls[VLS_POHYB])>0 && (vls[VLS_POHYB])<15)?1:(vls[VLS_POHYB])/15)
@ -277,7 +277,7 @@ static __inline int rangrnd(int a, int b) {return rnd(b-a+1)+a;}
//typy sektoru
#define ISTELEPORT(c) ((c)==S_TELEPORT || (c)>=S_USERTELEPORT && (c)<=S_USERTELEPORT_END)
#define ISTELEPORT(c) ((c)==S_TELEPORT || ((c)>=S_USERTELEPORT && (c)<=S_USERTELEPORT_END))
#define ISTELEPORTSECT(sect) ISTELEPORT(map_sectors[sect].sector_type)
#undef S_NORMAL