-
Notifications
You must be signed in to change notification settings - Fork 126
Open
Description
If I try to compile this on Ubuntu Server 15.10, I get a brunch of warnings. Here they are:
tiny.c: In function ‘handle_directory_request’:
tiny.c:173:14: warning: implicit declaration of function ‘fdopendir’ [-Wimplicit-function-declaration]
DIR *d = fdopendir(dir_fd);
^
tiny.c:173:14: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
tiny.c:180:20: warning: implicit declaration of function ‘openat’ [-Wimplicit-function-declaration]
if ((ffd = openat(dir_fd, dp->d_name, O_RDONLY)) == -1){
^
tiny.c: In function ‘serve_static’:
tiny.c:340:16: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘off_t {aka long int}’ [-Wformat=]
printf("offset: %d \n\n", offset);
^
tiny.c: In function ‘main’:
tiny.c:386:11: warning: variable ‘path’ set but not used [-Wunused-but-set-variable]
char *path = getcwd(buf, 256);
^
Additional information:
tiny-web-server$ c99 --version
gcc (Ubuntu 5.2.1-22ubuntu2) 5.2.1 20151010
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
tiny-web-server$ uname -a
Linux starbeamrainbowlabs.com 2.6.32-042stab111.12 #1 SMP Thu Sep 17 11:38:20 MSK 2015 x86_64 x86_64 x86_64 GNU/Linux
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels