Skip to content

Commit ee9d18a

Browse files
JAicewizardfacebook-github-bot
authored andcommitted
Fix building on mingw (#4420)
Summary: This restores the ability to compile with mingw introduced in #4145. I am not sure why msvc does allow this, but using the `_FMT` macro without any `vaargs` causes a trailing comma in the arguments list. which is not allowed in c++. This switches it over to the `_MSG` macro instead avoiding this issue. Pull Request resolved: #4420 Reviewed By: pankajsingh88 Differential Revision: D77827581 Pulled By: ramilbakhshyiev fbshipit-source-id: f63564546511e88084dbacc71458448d3c403de9
1 parent 520c15d commit ee9d18a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

faiss/impl/mapped_io.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,12 +168,12 @@ struct MmappedFileMappingOwner::PImpl {
168168
const int fd = _fileno(f);
169169
if (fd == -1) {
170170
// no good
171-
FAISS_THROW_FMT("could not get a HANDLE");
171+
FAISS_THROW_MSG("could not get a HANDLE");
172172
}
173173

174174
HANDLE file_handle = (HANDLE)_get_osfhandle(fd);
175175
if (file_handle == INVALID_HANDLE_VALUE) {
176-
FAISS_THROW_FMT("could not get an OS HANDLE");
176+
FAISS_THROW_MSG("could not get an OS HANDLE");
177177
}
178178

179179
// get the size of the file

0 commit comments

Comments
 (0)