mptre / pick

A fuzzy search tool for the command-line
MIT License
814 stars 42 forks source link

Fix compile error on GCC 10 (Fedora 32) #302

Closed FreedomBen closed 4 years ago

FreedomBen commented 4 years ago

GCC 10 complains about the unused variable called "unused"

Adding extern to the declarations fixes the error.

Fixes #301

mptre commented 4 years ago

The unused variable is there to ensure that the translation unit does not end up being empty if for instance reallocarray(3) is already present. I can't remember but some compiler(s) complained about this.

Does extern int unused silence the error?

mptre commented 4 years ago

Also, please turn the gitignore changes into a separate commit.

FreedomBen commented 4 years ago

Adding extern does indeed make the build happy. Branch is updated, and I'll move the .gitignore changes to a separate commit. Thanks!

Edit: gitignore has been moved to #304

mptre commented 4 years ago

Thanks, merged as 160d7be.