Skip to content
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

Fix compile warnings #605

Merged
merged 2 commits into from
Nov 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/common/mfu_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -1670,4 +1670,4 @@ int daos_lsetxattr(const char* path, const char* name, const void* value, size_t
return mfu_errno2rc(ENOSYS);
#endif
}
#endif DCOPY_USE_XATTRS
#endif // DCOPY_USE_XATTRS
5 changes: 3 additions & 2 deletions src/dcp/dcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include <unistd.h>
#include <errno.h>
#include <stdbool.h>
#include <grp.h>

/* for daos */
#ifdef DAOS_SUPPORT
Expand Down Expand Up @@ -116,7 +117,7 @@ int main(int argc, char** argv)
/* effective group/user id */
uid_t egid = 0, euid = 0;
uid_t gid = getegid(), uid = geteuid();
uid_t gids[MAX_GIDS];
gid_t gids[MAX_GIDS];
int gids_count = 0;

/* initialize MPI */
Expand Down Expand Up @@ -404,7 +405,7 @@ int main(int argc, char** argv)
/* setgroups before set gid or uid */
if (egid > 0 || euid > 0) {
/* record the original groups */
gids_count = getgroups(MAX_GIDS, &gids);
gids_count = getgroups(MAX_GIDS, gids);
if (gids_count < 0) {
MFU_LOG(MFU_LOG_ERR, "Could not getgroups: %s", strerror(errno));
mfu_finalize();
Expand Down