dev: add -Wextra in Makefile and clean warnings
This commit is contained in:
parent
9264c47494
commit
6592ec43fd
5 changed files with 10 additions and 3 deletions
2
Makefile
2
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)
|
||||
|
|
|
@ -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 ]
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue