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 int -> uint warning #2611

Merged
merged 5 commits into from
Dec 1, 2021
Merged
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
5 changes: 4 additions & 1 deletion src/os.cc
Original file line number Diff line number Diff line change
@@ -107,6 +107,8 @@ int detail::utf16_to_utf8::convert(basic_string_view<wchar_t> s) {

namespace detail {

using mode_t = int;
vitaut marked this conversation as resolved.
Show resolved Hide resolved

class system_message {
system_message(const system_message&) = delete;
void operator=(const system_message&) = delete;
@@ -218,7 +220,8 @@ int buffered_file::fileno() const {

#if FMT_USE_FCNTL
file::file(cstring_view path, int oflag) {
int mode = S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH;
using namespace detail;
mode_t mode = S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH;
# if defined(_WIN32) && !defined(__MINGW32__)
fd_ = -1;
FMT_POSIX_CALL(sopen_s(&fd_, path.c_str(), oflag, _SH_DENYNO, mode));