Skip to content
This repository was archived by the owner on May 18, 2024. It is now read-only.
This repository was archived by the owner on May 18, 2024. It is now read-only.

Compiling error caused by a possible typo and an unrecognized command line option -Wno-visibility #25

@jrcharney

Description

@jrcharney

Since I figure this would be a simple enough game to run on a Raspberry Pi 3, I downloaded it to my Pi to try it out.

However, I encountered a couple of errors that need fixing.

$ make
cc -Wno-visibility -Wno-incompatible-pointer-types -Wall -Wextra -DINVERT_COLORS -DVT100 -O2 src/ai.c src/options.c src/main.c src/highscore.c src/engine.c src/merge_std.c src/gfx_terminal.c -o 2048
src/gfx_terminal.c: In function ‘gfx_draw’:
src/gfx_terminal.c:59:28: warning: format ‘%zd’ expects argument of type ‘signed size_t’, but argument 3 has type ‘long int’ [-Wformat=]
                 printf("%*zd |", g->print_width, merge_value(g->grid[x][y]));
                            ^
src/gfx_terminal.c: At top level:
cc1: warning: unrecognized command line option ‘-Wno-visibility’

The first item is that typo on line 59 of gfx_terminal.c. Get rid of that z in that 'printf' statement.

The second item is that I've checked with just about every compiler (well, at least GCC and Clang documentation) and there is no such warning as -Wno-visibility. So you can drop that argument.

I'm going to try to make these corrections myself to see if that fixes everything.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions