Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remnove -Werror from makefile #84

Open
superbonaci opened this issue Sep 15, 2024 · 1 comment
Open

remnove -Werror from makefile #84

superbonaci opened this issue Sep 15, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@superbonaci
Copy link

Remove this line:

-Werror \

To avoid this error:

$ make
OBJECTS +++ src/commands/modify.c +++ out/src/commands/modify.o
gcc -std=c99 -D _GNU_SOURCE -Werror -Wall -Wextra -Wno-incompatible-pointer-types -Wno-multichar -Wno-unused-variable -Wno-unused-parameter -Wno-missing-field-initializers -I./include -I/opt/homebrew/Cellar/argp-standalone/1.5.0/include/ -c "src/commands/modify.c" -o "out/src/commands/modify.o"
src/commands/modify.c:553:19: error: variable 'val_end' set but not used [-Werror,-Wunused-but-set-variable]
            char* val_end   = (char*)node + globals.block_size;
                  ^
1 error generated.
make: *** [out/src/commands/modify.o] Error 1

So now compiles:

``
`
$ make
OBJECTS +++ src/commands/modify.c +++ out/src/commands/modify.o
gcc -std=c99 -D _GNU_SOURCE -Wall -Wextra -Wno-incompatible-pointer-types -Wno-multichar -Wno-unused-variable -Wno-unused-parameter -Wno-missing-field-initializers -I./include -I/opt/homebrew/Cellar/argp-standalone/1.5.0/include/ -c "src/commands/modify.c" -o "out/src/commands/modify.o"
src/commands/modify.c:553:19: warning: variable 'val_end' set but not used [-Wunused-but-set-variable]
char* val_end = (char*)node + globals.block_size;
^
1 warning generated.

OBJECTS +++ src/commands/read.c +++ out/src/commands/read.o
gcc -std=c99 -D _GNU_SOURCE -Wall -Wextra -Wno-incompatible-pointer-types -Wno-multichar -Wno-unused-variable -Wno-unused-parameter -Wno-missing-field-initializers -I./include -I/opt/homebrew/Cellar/argp-standalone/1.5.0/include/ -c "src/commands/read.c" -o "out/src/commands/read.o"

OBJECTS +++ src/commands/recover.c +++ out/src/commands/recover.o
gcc -std=c99 -D _GNU_SOURCE -Wall -Wextra -Wno-incompatible-pointer-types -Wno-multichar -Wno-unused-variable -Wno-unused-parameter -Wno-missing-field-initializers -I./include -I/opt/homebrew/Cellar/argp-standalone/1.5.0/include/ -c "src/commands/recover.c" -o "out/src/commands/recover.o"

OBJECTS +++ src/commands/resolver.c +++ out/src/commands/resolver.o
gcc -std=c99 -D _GNU_SOURCE -Wall -Wextra -Wno-incompatible-pointer-types -Wno-multichar -Wno-unused-variable -Wno-unused-parameter -Wno-missing-field-initializers -I./include -I/opt/homebrew/Cellar/argp-standalone/1.5.0/include/ -c "src/commands/resolver.c" -o "out/src/commands/resolver.o"

OBJECTS +++ src/commands/search.c +++ out/src/commands/search.o
gcc -std=c99 -D _GNU_SOURCE -Wall -Wextra -Wno-incompatible-pointer-types -Wno-multichar -Wno-unused-variable -Wno-unused-parameter -Wno-missing-field-initializers -I./include -I/opt/homebrew/Cellar/argp-standalone/1.5.0/include/ -c "src/commands/search.c" -o "out/src/commands/search.o"
src/commands/search.c:276:27: warning: variable 'val_end' set but not used [-Wunused-but-set-variable]
char* val_end = (char*)node + globals.block_size;
^
1 warning generated.

OBJECTS +++ src/commands/version.c +++ out/src/commands/version.o
gcc -std=c99 -D _GNU_SOURCE -Wall -Wextra -Wno-incompatible-pointer-types -Wno-multichar -Wno-unused-variable -Wno-unused-parameter -Wno-missing-field-initializers -I./include -I/opt/homebrew/Cellar/argp-standalone/1.5.0/include/ -c "src/commands/version.c" -o "out/src/commands/version.o"

OBJECTS +++ src/drat.c +++ out/src/drat.o
gcc -std=c99 -D _GNU_SOURCE -Wall -Wextra -Wno-incompatible-pointer-types -Wno-multichar -Wno-unused-variable -Wno-unused-parameter -Wno-missing-field-initializers -I./include -I/opt/homebrew/Cellar/argp-standalone/1.5.0/include/ -c "src/drat.c" -o "out/src/drat.o"

OBJECTS +++ include/drat/print-fs-records.c +++ out/include/drat/print-fs-records.o
gcc -std=c99 -D _GNU_SOURCE -Wall -Wextra -Wno-incompatible-pointer-types -Wno-multichar -Wno-unused-variable -Wno-unused-parameter -Wno-missing-field-initializers -I./include -I/opt/homebrew/Cellar/argp-standalone/1.5.0/include/ -c "include/drat/print-fs-records.c" -o "out/include/drat/print-fs-records.o"
include/drat/print-fs-records.c:18:12: warning: variable 'num_records' set but not used [-Wunused-but-set-variable]
size_t num_records = 0;
^
1 warning generated.

OBJECTS +++ include/drat/io.c +++ out/include/drat/io.o
gcc -std=c99 -D _GNU_SOURCE -Wall -Wextra -Wno-incompatible-pointer-types -Wno-multichar -Wno-unused-variable -Wno-unused-parameter -Wno-missing-field-initializers -I./include -I/opt/homebrew/Cellar/argp-standalone/1.5.0/include/ -c "include/drat/io.c" -o "out/include/drat/io.o"

OBJECTS +++ include/drat/argp.c +++ out/include/drat/argp.o
gcc -std=c99 -D _GNU_SOURCE -Wall -Wextra -Wno-incompatible-pointer-types -Wno-multichar -Wno-unused-variable -Wno-unused-parameter -Wno-missing-field-initializers -I./include -I/opt/homebrew/Cellar/argp-standalone/1.5.0/include/ -c "include/drat/argp.c" -o "out/include/drat/argp.o"

OBJECTS +++ include/drat/time.c +++ out/include/drat/time.o
gcc -std=c99 -D _GNU_SOURCE -Wall -Wextra -Wno-incompatible-pointer-types -Wno-multichar -Wno-unused-variable -Wno-unused-parameter -Wno-missing-field-initializers -I./include -I/opt/homebrew/Cellar/argp-standalone/1.5.0/include/ -c "include/drat/time.c" -o "out/include/drat/time.o"

OBJECTS +++ include/drat/string/btree.c +++ out/include/drat/string/btree.o
gcc -std=c99 -D _GNU_SOURCE -Wall -Wextra -Wno-incompatible-pointer-types -Wno-multichar -Wno-unused-variable -Wno-unused-parameter -Wno-missing-field-initializers -I./include -I/opt/homebrew/Cellar/argp-standalone/1.5.0/include/ -c "include/drat/string/btree.c" -o "out/include/drat/string/btree.o"

OBJECTS +++ include/drat/string/common.c +++ out/include/drat/string/common.o
gcc -std=c99 -D _GNU_SOURCE -Wall -Wextra -Wno-incompatible-pointer-types -Wno-multichar -Wno-unused-variable -Wno-unused-parameter -Wno-missing-field-initializers -I./include -I/opt/homebrew/Cellar/argp-standalone/1.5.0/include/ -c "include/drat/string/common.c" -o "out/include/drat/string/common.o"

OBJECTS +++ include/drat/string/object.c +++ out/include/drat/string/object.o
gcc -std=c99 -D _GNU_SOURCE -Wall -Wextra -Wno-incompatible-pointer-types -Wno-multichar -Wno-unused-variable -Wno-unused-parameter -Wno-missing-field-initializers -I./include -I/opt/homebrew/Cellar/argp-standalone/1.5.0/include/ -c "include/drat/string/object.c" -o "out/include/drat/string/object.o"

OBJECTS +++ include/drat/string/nx.c +++ out/include/drat/string/nx.o
gcc -std=c99 -D _GNU_SOURCE -Wall -Wextra -Wno-incompatible-pointer-types -Wno-multichar -Wno-unused-variable -Wno-unused-parameter -Wno-missing-field-initializers -I./include -I/opt/homebrew/Cellar/argp-standalone/1.5.0/include/ -c "include/drat/string/nx.c" -o "out/include/drat/string/nx.o"

OBJECTS +++ include/drat/string/j.c +++ out/include/drat/string/j.o
gcc -std=c99 -D _GNU_SOURCE -Wall -Wextra -Wno-incompatible-pointer-types -Wno-multichar -Wno-unused-variable -Wno-unused-parameter -Wno-missing-field-initializers -I./include -I/opt/homebrew/Cellar/argp-standalone/1.5.0/include/ -c "include/drat/string/j.c" -o "out/include/drat/string/j.o"

OBJECTS +++ include/drat/string/fs.c +++ out/include/drat/string/fs.o
gcc -std=c99 -D _GNU_SOURCE -Wall -Wextra -Wno-incompatible-pointer-types -Wno-multichar -Wno-unused-variable -Wno-unused-parameter -Wno-missing-field-initializers -I./include -I/opt/homebrew/Cellar/argp-standalone/1.5.0/include/ -c "include/drat/string/fs.c" -o "out/include/drat/string/fs.o"

OBJECTS +++ include/drat/string/omap.c +++ out/include/drat/string/omap.o
gcc -std=c99 -D _GNU_SOURCE -Wall -Wextra -Wno-incompatible-pointer-types -Wno-multichar -Wno-unused-variable -Wno-unused-parameter -Wno-missing-field-initializers -I./include -I/opt/homebrew/Cellar/argp-standalone/1.5.0/include/ -c "include/drat/string/omap.c" -o "out/include/drat/string/omap.o"

OBJECTS +++ include/drat/string/general.c +++ out/include/drat/string/general.o
gcc -std=c99 -D _GNU_SOURCE -Wall -Wextra -Wno-incompatible-pointer-types -Wno-multichar -Wno-unused-variable -Wno-unused-parameter -Wno-missing-field-initializers -I./include -I/opt/homebrew/Cellar/argp-standalone/1.5.0/include/ -c "include/drat/string/general.c" -o "out/include/drat/string/general.o"

OBJECTS +++ include/drat/string/xf.c +++ out/include/drat/string/xf.o
gcc -std=c99 -D _GNU_SOURCE -Wall -Wextra -Wno-incompatible-pointer-types -Wno-multichar -Wno-unused-variable -Wno-unused-parameter -Wno-missing-field-initializers -I./include -I/opt/homebrew/Cellar/argp-standalone/1.5.0/include/ -c "include/drat/string/xf.c" -o "out/include/drat/string/xf.o"

OBJECTS +++ include/drat/string/dstream.c +++ out/include/drat/string/dstream.o
gcc -std=c99 -D _GNU_SOURCE -Wall -Wextra -Wno-incompatible-pointer-types -Wno-multichar -Wno-unused-variable -Wno-unused-parameter -Wno-missing-field-initializers -I./include -I/opt/homebrew/Cellar/argp-standalone/1.5.0/include/ -c "include/drat/string/dstream.c" -o "out/include/drat/string/dstream.o"

OBJECTS +++ include/drat/globals.c +++ out/include/drat/globals.o
gcc -std=c99 -D _GNU_SOURCE -Wall -Wextra -Wno-incompatible-pointer-types -Wno-multichar -Wno-unused-variable -Wno-unused-parameter -Wno-missing-field-initializers -I./include -I/opt/homebrew/Cellar/argp-standalone/1.5.0/include/ -c "include/drat/globals.c" -o "out/include/drat/globals.o"

OBJECTS +++ include/drat/commands.c +++ out/include/drat/commands.o
gcc -std=c99 -D _GNU_SOURCE -Wall -Wextra -Wno-incompatible-pointer-types -Wno-multichar -Wno-unused-variable -Wno-unused-parameter -Wno-missing-field-initializers -I./include -I/opt/homebrew/Cellar/argp-standalone/1.5.0/include/ -c "include/drat/commands.c" -o "out/include/drat/commands.o"

OBJECTS +++ include/drat/func/btree.c +++ out/include/drat/func/btree.o
gcc -std=c99 -D _GNU_SOURCE -Wall -Wextra -Wno-incompatible-pointer-types -Wno-multichar -Wno-unused-variable -Wno-unused-parameter -Wno-missing-field-initializers -I./include -I/opt/homebrew/Cellar/argp-standalone/1.5.0/include/ -c "include/drat/func/btree.c" -o "out/include/drat/func/btree.o"

OBJECTS +++ include/drat/func/cksum.c +++ out/include/drat/func/cksum.o
gcc -std=c99 -D _GNU_SOURCE -Wall -Wextra -Wno-incompatible-pointer-types -Wno-multichar -Wno-unused-variable -Wno-unused-parameter -Wno-missing-field-initializers -I./include -I/opt/homebrew/Cellar/argp-standalone/1.5.0/include/ -c "include/drat/func/cksum.c" -o "out/include/drat/func/cksum.o"

OBJECTS +++ include/drat/func/boolean.c +++ out/include/drat/func/boolean.o
gcc -std=c99 -D _GNU_SOURCE -Wall -Wextra -Wno-incompatible-pointer-types -Wno-multichar -Wno-unused-variable -Wno-unused-parameter -Wno-missing-field-initializers -I./include -I/opt/homebrew/Cellar/argp-standalone/1.5.0/include/ -c "include/drat/func/boolean.c" -o "out/include/drat/func/boolean.o"

OBJECTS +++ include/drat/func/j.c +++ out/include/drat/func/j.o
gcc -std=c99 -D _GNU_SOURCE -Wall -Wextra -Wno-incompatible-pointer-types -Wno-multichar -Wno-unused-variable -Wno-unused-parameter -Wno-missing-field-initializers -I./include -I/opt/homebrew/Cellar/argp-standalone/1.5.0/include/ -c "include/drat/func/j.c" -o "out/include/drat/func/j.o"

OBJECTS +++ include/drat/func/xf.c +++ out/include/drat/func/xf.o
gcc -std=c99 -D _GNU_SOURCE -Wall -Wextra -Wno-incompatible-pointer-types -Wno-multichar -Wno-unused-variable -Wno-unused-parameter -Wno-missing-field-initializers -I./include -I/opt/homebrew/Cellar/argp-standalone/1.5.0/include/ -c "include/drat/func/xf.c" -o "out/include/drat/func/xf.o"

BINARIES +++ out/src/drat.o +++ drat
gcc out/src/drat.o out/src/commands/list.o out/src/commands/resolver.o out/src/commands/inspect.o out/src/commands/explore-omap-tree.o out/src/commands/search.o out/src/commands/read.o out/src/commands/explore-fs-tree.o out/src/commands/recover.o out/src/commands/version.o out/src/commands/modify.o out/include/drat/print-fs-records.o out/include/drat/io.o out/include/drat/argp.o out/include/drat/time.o out/include/drat/string/btree.o out/include/drat/string/common.o out/include/drat/string/object.o out/include/drat/string/nx.o out/include/drat/string/j.o out/include/drat/string/fs.o out/include/drat/string/omap.o out/include/drat/string/general.o out/include/drat/string/xf.o out/include/drat/string/dstream.o out/include/drat/globals.o out/include/drat/commands.o out/include/drat/func/btree.o out/include/drat/func/cksum.o out/include/drat/func/boolean.o out/include/drat/func/j.o out/include/drat/func/xf.o -L/opt/homebrew/Cellar/argp-standalone/1.5.0/lib/ -largp -o drat

@jivanpal
Copy link
Owner

The proper fix here is to comment out lines 552–555. Will add to the task list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Ready
Development

No branches or pull requests

2 participants