nvim-telescope / telescope-fzf-native.nvim

FZF sorter for telescope written in c
1.4k stars 46 forks source link

Unable to build: error: declaration shadows a local variable #109

Closed Ramxii closed 1 year ago

Ramxii commented 1 year ago
mkdir -p build
clang -O3 -ferror-limit=1 -gdwarf-4 -ggdb3 -O0 -std=c11 -Wall -Werror -Wextra -Wno-gnu-folding-constant -Wno-sign-compare -Wno-unused-parameter -Wno-unused-variable -Wno-unused-but-set-variable -Wshadow -Wall -Werror -fpic -std=gnu99 -shared src/fzf.c -o build/libfzf.so
src/fzf.c:666:12: error: declaration shadows a local variable [-Werror,-Wshadow]
    size_t f = (size_t)f_sub.data[off];
           ^
src/fzf.c:554:13: note: previous declaration is here
  fzf_i32_t f = alloc32(&offset32, slab, M);
            ^
1 error generated.
make: *** [Makefile:24: build/libfzf.so] Error 1

I get this error when running make.

Ramxii commented 1 year ago

It wasn't building so I decided to install it through my package manager on Arch Linux and it worked.

Conni2461 commented 1 year ago

i think i also fixed that but i dont know why your compile flags look that weird. But you can also try building this project with cmake, maybe that works better for you :) we have documentation for that in the readme