Skip to content

Commit 46363d7

Browse files
committed
Fix -Wint-conversion error building with clang
openscapPYTHON_wrap.c:3734:14: error: incompatible integer to pointer conversion returning 'int' from a function with result type 'char *' [-Wint-conversion] return 1; ^ It seems like return 1 is a copy-and-paste error and the function should return NULL here. It's possible this function (sub_callback_wrapper) is unused and can be deleted but I wasn't sure.
1 parent 2189529 commit 46363d7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

swig/openscap.i

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,7 @@ char * sub_callback_wrapper(xccdf_subst_type_t type, const char *id, void *arg)
475475
arglist = Py_BuildValue("isO", type, id, usrdata);
476476
if (!PyCallable_Check(func)) {
477477
PyGILState_Release(state);
478-
return 1;
478+
return NULL;
479479
}
480480
result = PyEval_CallObject(func, arglist);
481481
if (result == NULL) {

0 commit comments

Comments
 (0)