-
Notifications
You must be signed in to change notification settings - Fork 12
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
compilation on error (and warnings) os osx 10.11.5 #2
Comments
What if remove |
Signed-off-by: Jim Klimov <jimklimov@gmail.com>
Poked on a Mac Monterey VM with Homebrew (
on another run that got a few lines past the fixed warnings, also
These bits are addressed in my PR #14 now :) Despite the remaining warnings, the program seems to work for my PoC use-case on that platform too! |
Hi,
I'm trying to compile execfuse on osx, but I hit the following error .. Maybe someone will be able to advise what to do to fix them ?
cc -O2 -ggdb -Wall execfuse.c chunked_buffer.c execute_script.c -D_FILE_OFFSET_BITS=64 -D_DARWIN_USE_64_BIT_INODE -I/usr/local/include/osxfuse/fuse -L/usr/local/lib -losxfuse -pthread -liconv -o execfuse
execfuse.c:47:11: warning: format specifies type 'int ' but the argument has type 'nlink_t *' (aka 'unsigned short *') [-Wformat]
,&stbuf->st_nlink
^~~~~~~~~~~~~~~~
execfuse.c:50:11: warning: format specifies type 'long long *' but the argument has type 'dev_t *' (aka 'int *') [-Wformat]
,&stbuf->st_rdev
^~~~~~~~~~~~~~~
execfuse.c:52:11: warning: format specifies type 'long *' but the argument has type 'blksize_t *' (aka 'int *') [-Wformat]
,&stbuf->st_blksize
^~~~~~~~~~~~~~~~~~
execfuse.c:273:5: warning: 'sem_init' is deprecated [-Wdeprecated-declarations]
sem_init(&i->sem, 0, 1);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/sys/semaphore.h:55:5: note: 'sem_init' has been explicitly
marked deprecated here
int sem_init(sem_t *, int, unsigned int) *deprecated;
^
execfuse.c:378:5: warning: 'sem_destroy' is deprecated [-Wdeprecated-declarations]
sem_destroy(&i->sem);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/sys/semaphore.h:53:5: note: 'sem_destroy' has been explicitly
marked deprecated here
int sem_destroy(sem_t ) __deprecated;
^
execfuse.c:420:33: warning: format specifies type 'unsigned long long' but the argument has type 'dev_t' (aka 'int') [-Wformat]
sprintf(b, "0x%016llx", rdev);
~~~~~~~ ^~~~
%016x
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/secure/_stdio.h:47:56: note: expanded from macro 'sprintf'
__builtin___sprintf_chk (str, 0, __darwin_obsz(str), __VA_ARGS)
^~~~~~~~~~~
execfuse.c:525:6: error: field designator 'flag_nullpath_ok' does not refer to any field in type 'struct fuse_operations'
.flag_nullpath_ok = 1,
^
6 warnings and 1 error generated.
execute_script.c:37:2: warning: implicitly declaring library function 'sprintf' with type 'int (char *, const char *, ...)' [-Wimplicit-function-declaration]
sprintf(script_path, "%s/%s", directory, script_name);
^
execute_script.c:37:2: note: include the header <stdio.h> or explicitly provide a declaration for 'sprintf'
1 warning generated.
make: ** [execfuse] Error 1
Olivier
The text was updated successfully, but these errors were encountered: