diff --git a/Makefile b/Makefile index 6ee8604..23fa39c 100644 --- a/Makefile +++ b/Makefile @@ -62,7 +62,7 @@ RSF := $(TOPDIR)/$(RESOURCES)/template.rsf # options for code generation #--------------------------------------------------------------------------------- ARCH := -march=armv6k -mtune=mpcore -mfloat-abi=hard -mtp=soft -COMMON := -Wall -O2 -mword-relocations -fomit-frame-pointer -ffunction-sections $(ARCH) $(INCLUDE) -D__3DS__ $(FLAGS) +COMMON := -Wall -Wextra -O2 -mword-relocations -fomit-frame-pointer -ffunction-sections $(ARCH) $(INCLUDE) -D__3DS__ $(FLAGS) CFLAGS := $(COMMON) -std=gnu99 CXXFLAGS := $(COMMON) -fno-rtti -fno-exceptions -std=gnu++11 ASFLAGS := $(ARCH) diff --git a/embedassets.sh b/embedassets.sh index fd8fe3b..e4b9f46 100755 --- a/embedassets.sh +++ b/embedassets.sh @@ -12,7 +12,7 @@ ASSET_FILES=$@ >> __embeddedassets.c echo '#include "mlx3ds.h"' >> __embeddedassets.c echo 'const t_embeddedasset *mlx3ds_assets_get(const char *name)' >> __embeddedassets.c echo '{' ->> __embeddedassets.c echo ' const static t_embeddedasset assets[] = {' +>> __embeddedassets.c echo ' static const t_embeddedasset assets[] = {' for file in $ASSET_FILES do if [ ! -f $file ] diff --git a/source/mlx_image.c b/source/mlx_image.c index 5fe387a..89087bc 100644 --- a/source/mlx_image.c +++ b/source/mlx_image.c @@ -35,6 +35,7 @@ t_image mlx_new_image(void *mlx_ptr, int width, int height) int mlx_destroy_image(t_mlx mlx_ptr, t_image img_ptr) { + (void)mlx_ptr; if (img_ptr) free(((t_internal_image *)img_ptr)->data); free(img_ptr); diff --git a/source/mlx_internal.c b/source/mlx_internal.c index 885b2ae..6ef588e 100644 --- a/source/mlx_internal.c +++ b/source/mlx_internal.c @@ -22,6 +22,7 @@ void mlx3ds_internal_fatalerror(const char *msg) void mlx3ds_internal_drawstart( t_internal_mlx *mlx_ptr, t_internal_win *win_ptr) { + (void)mlx_ptr; win_ptr->framebuffer = gfxGetFramebuffer(GFX_TOP, GFX_LEFT, &win_ptr->framebuffer_height, &win_ptr->framebuffer_width); gspWaitForVBlank(); @@ -30,6 +31,8 @@ void mlx3ds_internal_drawstart( void mlx3ds_internal_drawend( t_internal_mlx *mlx_ptr, t_internal_win *win_ptr) { + (void)mlx_ptr; + (void)win_ptr; gfxFlushBuffers(); gfxSwapBuffers(); } diff --git a/source/mlx_xpm.c b/source/mlx_xpm.c index c7dc82c..4560a6d 100644 --- a/source/mlx_xpm.c +++ b/source/mlx_xpm.c @@ -73,6 +73,7 @@ char *mlx_int_static_line(char **xpm_data,int *pos,int size) int len2; char *str; + (void)size; str = xpm_data[(*pos)++]; if ((len2 = strlen(str))>len) { @@ -127,6 +128,7 @@ int mlx_int_xpm_set_pixel(t_internal_image *img, u8 *data, int opp, int col, int { int dec; + (void)img; dec = opp; while (dec--) { @@ -293,7 +295,8 @@ t_image mlx_xpm_file_to_image(t_mlx xvar, const char *file,int *width,int *heigh return (NULL); ptr = strdup(asset->data); mlx_int_file_get_rid_comment(ptr, asset->size); - if (img = mlx_int_parse_xpm(xvar,ptr,asset->size,mlx_int_get_line)) + img = mlx_int_parse_xpm(xvar,ptr,asset->size,mlx_int_get_line); + if (img) { *width = img->width; *height = img->height;