jgigault / 42FileChecker

42FileChecker is a tiny bash script developed at 42 school for testing and checking files according to the rules of the subjects
Apache License 2.0
306 stars 56 forks source link

getinode fails to build (at least on ubuntu-based distros) #138

Closed Avatarochnik closed 5 years ago

Avatarochnik commented 5 years ago
make: Entering directory '/home/lookris/42FileChecker/srcs/get_inode'
main.c: In function ‘main’:
main.c:34:13: error: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 2 has type ‘__ino_t {aka long unsigned int}’ [-Werror=format=]
  printf("%llu/%s", st.st_ino, formatdate(date, st.st_mtime));
          ~~~^      ~~~~~~~~~
          %lu
cc1: all warnings being treated as errors
Makefile:19: recipe for target 'obj/main.o' failed
make: *** [obj/main.o] Error 1
make: Leaving directory '/home/lookris/42FileChecker/srcs/get_inode'

mygetinode.txt

jgigault commented 5 years ago

Hello @Avatarochnik

Sorry for my late answer. And thank you for having reported your issue.

I created a PR #147 to try solving your issue using explicit cast. Could you have a try?

cd ~/42FileChecker
git fetch origin 
git checkout fix/compile-get-inode-ubuntu
cd srcs/get_inode/
make

Thank you for your help