Skip to content

Commit

Permalink
Removing compiler warnings from Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
sai2791 committed Feb 27, 2021
1 parent 3eeecc8 commit a7dc760
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
11 changes: 11 additions & 0 deletions fs_fileio.c
Original file line number Diff line number Diff line change
Expand Up @@ -333,9 +333,20 @@ fs_get_args(struct fs_context *c)
fs_err(c, EC_FS_E_BADARGS);
return;
}
// Differences between apple uint64_t and linux
// removes complier warning
#ifdef __APPLE__
if (debug)
printf(" <- %llu\n",
fs_read_val(reply.val, sizeof(reply.val)));
#endif

#ifdef __LINUX__
if (debug)
printf(" <- %lu\n",
fs_read_val(reply.val, sizeof(reply.val)));
#endif

reply.std_tx.command_code = EC_FS_CC_DONE;
reply.std_tx.return_code = EC_FS_RC_OK;
fs_reply(c, &(reply.std_tx), sizeof(reply));
Expand Down
3 changes: 2 additions & 1 deletion fs_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,9 @@ fs_access_to_mode(unsigned char access, int usergroup)
mode |= S_IRUSR | (usergroup ? S_IRGRP : 0);
if (access & EC_FS_ACCESS_UW)
mode |= S_IWUSR | (usergroup ? S_IWGRP : 0);
if (access & EC_FS_ACCESS_L)
if (access & EC_FS_ACCESS_L) {
mode |= S_IXUSR | (usergroup ? S_IXGRP : 0);
}
if (access & EC_FS_ACCESS_OR)
mode |= S_IROTH | (usergroup ? 0 : S_IRGRP);
if (access & EC_FS_ACCESS_OW)
Expand Down

0 comments on commit a7dc760

Please sign in to comment.