fix some warnings

This commit is contained in:
Stefan Bühler 2017-06-12 12:47:01 +02:00
parent e567abcc93
commit ed516154d8
6 changed files with 27 additions and 28 deletions

View File

@ -279,7 +279,7 @@ int searchgames(void) {
avahi_threaded_poll_lock(threaded_poll);
if (NULL == (browser = avahi_service_browser_new(client, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, SERVICE_TYPE, NULL, 0, browse_callback, &gameversion))) {
if (NULL == (browser = avahi_service_browser_new(client, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, SERVICE_TYPE, NULL, 0, browse_callback, NULL))) {
fprintf(stderr, "Failed to create service browser: %s\n", avahi_strerror(avahi_client_errno(client)));
avahi_threaded_poll_unlock(threaded_poll);
return 0;

13
game.c
View File

@ -468,11 +468,12 @@ static void drawbombs(void) {
static void drawflames(void) {
flame *fl;
int xpos,ypos;
int color;
/* no player specific flame sprites yet */
/* int color; */
int fig;
list_for_each_entry(fl, &activeflames, list) {
color=fl->owner->color;
/* color=fl->owner->color; */
xpos=tovideox(fl->xpos);
ypos=tovideoy(fl->ypos);
fig=(fl->timer*10)/FLAMELIFE;
@ -747,9 +748,9 @@ static void applybonus(player *pl,bonustile *bonus) {
}
static void doplayer(player *pl) {
int last;
/* int last; */
int color;
int speed;
/* int speed; */
int px,py;
int there;
int flags;
@ -763,9 +764,9 @@ static void doplayer(player *pl) {
flags=pl->flags;
if(flags&FLG_DEAD) return;
color=pl->color;
last=pl->doing;
/* last=pl->doing; */
pl->doing=what;
speed=pl->speed;
/* speed=pl->speed; */
px=screentoarrayx(pl->xpos);
py=screentoarrayy(pl->ypos);
there=field[py][px];

8
gfx.c
View File

@ -158,12 +158,12 @@ static void gfxfetchsingle(figure *fig,gfxset *gs,int sourcex,int sourcey,int si
{
uchar *p,*p2;
int dx,dy;
uchar *map1;
/* uchar *map1; */
int gswidth;
int minx,miny,maxx,maxy;
int tx,ty;
map1=gs->gs_inout;
/* map1=gs->gs_inout; */
gswidth=gs->gs_xsize;
p=gs->gs_pic+sourcex+gswidth*sourcey;
minx=miny=maxx=maxy=-1;
@ -480,7 +480,7 @@ int checkbuttondown(int button)
return buttondown & (1<<button);
}
int anydown()
int anydown(void)
{
return numdown;
}
@ -498,7 +498,7 @@ int res=0;
}
return res;
}
int firstdown(vopid)
int firstdown(void)
{
return *downcodes;
}

26
gfx.h
View File

@ -28,38 +28,38 @@ void closegfx(void);
void greyrect(int x,int y,int xsize,int ysize);
void clearrect(int x,int y,int xsize,int ysize);
void solidfetch(gfxset *gs,solid *dest);
extern void dumpgfx();
extern void dumpgfx(void);
extern void createinout(struct gfxset *);
extern void getcolors();
extern void getcolors(void);
extern void gfxfetch(struct gfxset *,struct figure *,int);
extern void puttile(int destx,int desty,int source);
extern void store(int x,int y,int which);
extern void restore(int x,int y,int which);
extern void copyup();
extern void copyup(void);
extern void copyupxy(int x,int y);
extern void copyupxysize(int x,int y,int xsize,int ysize);
extern void getfigures();
extern void getfigures(void);
extern unsigned long getcolor(char *name); /* unsigned long */
extern int checkpressed(int code);
extern int checkdown(int code);
extern int checkbutton(int button);
extern int checkbuttondown(int button);
extern int anydown();
extern int firstdown();
extern void scaninput();
extern void fontinit();
extern int anydown(void);
extern int firstdown(void);
extern void scaninput(void);
extern void fontinit(void);
extern void writechar(int x,int y,uchar ch);
extern void clear();
extern void clear(void);
extern void drawbox(int x,int y,int size,int color);
extern void drawbox2(int x,int y,int sizex,int sizey,int color);
extern void drawfillrect(int x,int y,int size,int color);
extern void bigpixel(int x,int y,int color);
extern void invert(int x,int y);
extern int getmousex();
extern int getmousey();
extern int getmousex(void);
extern int getmousey(void);
extern void drawsquare(int x,int y,uchar *source);
extern void colormapon();
extern void colormapoff();
extern void colormapon(void);
extern void colormapoff(void);
extern void palette(uchar *pal);
extern void drawfigure(int x,int y,figure *fig);
extern void drawfigureany(int x,int y,figure *fig,solid *dest);

2
list.c
View File

@ -21,8 +21,6 @@ static genericlistitem *free_things;
static int count_used = 0;
static const int num = MAXTHINGS;
void alloc_things(void) {
int i;

View File

@ -149,7 +149,7 @@ void soundclose(void) {
int readsound(int num) {
char name[256],*p1,*p2,ch;
int i,file,size,len;
int file,size,len;
p1=dirlist;
for(;;)
{
@ -173,7 +173,7 @@ int i,file,size,len;
p1=samples[num].data=malloc(len);
if(p1)
{
i=read(file,p1,size);
read(file,p1,size);
if(len-size) memset(p1+size,0,len-size);
while(size--) *p1++ ^= 0x80;
} else