Skip to content

Commit

Permalink
Remove -Werror, I only ensure it can be no warnings on msvc
Browse files Browse the repository at this point in the history
Fix Unsafe.set buggy
  • Loading branch information
xia-mc committed Nov 13, 2024
1 parent ad10549 commit b63cb90
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 4 deletions.
1 change: 0 additions & 1 deletion pyfastutil/src/ints/IntArrayList.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#define PYFASTUTIL_INTARRAYLIST_H

#include "utils/PythonPCH.h"
#include "Compat.h"

PyMODINIT_FUNC PyInit_IntArrayList();

Expand Down
2 changes: 1 addition & 1 deletion pyfastutil/src/unsafe/Unsafe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ static PyObject *Unsafe_set([[maybe_unused]] PyObject *self, PyObject *args) {
}

const Py_ssize_t pySize = PyBytes_Size(pyBytes);
if (pySize == -1 || pySize > static_cast<Py_ssize_t>(SIZE_MAX)) {
if (pySize == -1 || pySize > SIZE_MAX) {
PyErr_SetString(PyExc_TypeError, "Invalid bytes.");
return nullptr;
}
Expand Down
1 change: 0 additions & 1 deletion pyfastutil/src/unsafe/Unsafe.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#define PYFASTUTIL_UNSAFE_H

#include "utils/PythonPCH.h"
#include "Compat.h"

PyMODINIT_FUNC PyInit_Unsafe();

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# Unix-like uses GCC/Clang
EXTRA_COMPILE_ARG = [
"-O3", "-funroll-loops", "-flto", "-fPIC",
"-std=c++2b", "-Wall", "-Werror", "-fvisibility=hidden",
"-std=c++2b", "-Wall", "-fvisibility=hidden",
"-Wno-error=unknown-pragmas",
"-Wno-error=unguarded-availability-new" # already handle in Compat.h
]
Expand Down

0 comments on commit b63cb90

Please sign in to comment.