Browse Source

fixed warnings cause by common compiler options

ftpd.c (trim trailing spaces)
vfs.c (added suggested parentheses)
fixed prototype of main() function
pull/27/head
Vitus Birkmeir 3 years ago
parent
commit
eec613a9f3
  1. 2
      test-in-docker/src/main.c
  2. 2
      vfs.c

2
test-in-docker/src/main.c

@ -120,7 +120,7 @@ static err_t init_callback(struct netif* netif) {
return ERR_OK;
}
int main(size_t argc, char **argv) {
int main(int argc, char **argv) {
pcap_t *pcap = pcap_open_live("eth0", 65536, 1, 100, NULL);
char errbuf[PCAP_ERRBUF_SIZE];
int r = pcap_setnonblock(pcap, 1, errbuf);

2
vfs.c

@ -74,7 +74,7 @@ int vfs_stat(vfs_t* vfs, const char* filename, vfs_stat_t* st) {
.tm_hour = (f.ftime >> 11) & 0x1f,
.tm_mday = f.fdate & 0x1f,
.tm_mon = (f.fdate >> 5) & 0xf,
.tm_year = 80 + (f.fdate >> 9) & 0x7f,
.tm_year = 80 + ((f.fdate >> 9) & 0x7f),
};
st->st_mtime = mktime(&tm);
return 0;

Loading…
Cancel
Save