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

Three portability fixes around integer width #640

Merged
merged 1 commit into from
Apr 25, 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
10 changes: 2 additions & 8 deletions src/raft/uv_fs.c
Original file line number Diff line number Diff line change
Expand Up @@ -704,15 +704,9 @@ static int probeDirectIO(int fd, size_t *size, char *errmsg)
default:
/* UNTESTED: this is an unsupported file system.
*/
#if defined(__s390x__)
ErrMsgPrintf(errmsg,
"unsupported file system: %ux",
fs_info.f_type);
#else
ErrMsgPrintf(errmsg,
"unsupported file system: %zx",
fs_info.f_type);
#endif
"unsupported file system: %llx",
(unsigned long long)fs_info.f_type);
return RAFT_IOERR;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/raft/uv_os.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ int UvOsFallocateEmulation(int fd, off_t offset, off_t len)
if (f.f_bsize == 0) {
increment = 512;
} else if (f.f_bsize < 4096) {
increment = f.f_bsize;
increment = (ssize_t)f.f_bsize;
} else {
increment = 4096;
}
Expand Down
2 changes: 1 addition & 1 deletion src/tracing.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ static inline void tracerEmit(const char *file,
tracerPidCached,

tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday, tm.tm_hour,
tm.tm_min, tm.tm_sec, ts.tv_nsec,
tm.tm_min, tm.tm_sec, (unsigned long)ts.tv_nsec,

(unsigned)tid, tracerTraceLevelName(level), func,
tracerShortFileName(file), line, message);
Expand Down
Loading