AgentD / squashfs-tools-ng

A new set of tools and libraries for working with SquashFS images
Other
194 stars 30 forks source link

Doesn't build with GCC 10+ #59

Closed gcsideal closed 4 years ago

gcsideal commented 4 years ago

When building with GCC 9.3.0 all is fine. But when GCC 10.1.0 is used for compilation: cc -DHAVE_CONFIG_H -I. -I./include -D_GNU_SOURCE -DWITH_LZO -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -Wextra -Wunused -Wmissing-prototypes -Wmissing-declarations -Wwrite-strings -Wjump-misses-init -Wuninitialized -Winit-self -Wlogical-op -Wunused-but-set-parameter -Wunused-but-set-variable -Wunused-parameter -Wunused-result -Wunused-variable -Wduplicated-cond -Wduplicated-branches -Wrestrict -Wnull-dereference -pedantic -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -I/usr/include/readline -g -O2 -fdebug-prefix-map=/root/tmp/squashfs-tools-ng-1.0.0=. -fstack-protector-strong -Wformat -Werror=format-security -c -o extras/sqfsbrowse-browse.o test -f 'extras/browse.c' || echo './'extras/browse.c extras/browse.c: In function ‘list_directory’: extras/browse.c:66:9: error: too few arguments to function ‘sqfs_dir_reader_open_dir’ 66 | ret = sqfs_dir_reader_open_dir(dr, working_dir); | ^~~~~~~~ In file included from extras/browse.c:3: ./include/sqfs/dir_reader.h:190:14: note: declared here

Which is correct as sqfs_dir_reader_open_dir() declared as: int sqfs_dir_reader_open_dir(sqfs_dir_reader_t rd, const sqfs_inode_generic_t inode, sqfs_u32 flags); But tried to use as: ret = sqfs_dir_reader_open_dir(dr, working_dir); It doesn't pass 'flags' to the function call on several places.

AgentD commented 4 years ago

Hi!

Does it work with the recent master branch? Pull request #57 should have fixed this.

This pull request was merged in after the release of v1.0.0. In case you want to use the signed release tar ball, the pull request has also been exported as a signed patch, that can be applied to the tar ball and is published here:

https://infraroot.at/pub/squashfs/patches-1.0.0/

gcsideal commented 4 years ago

Does it work with the recent master branch? Pull request #57 should have fixed this.

Ah, only checked the release tarball. I do confirm the mentioned commit 259a989 fixes this issue.