Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c7f4af4

Browse files
committed
Fix compiler warnings about formatting pid_t as an int, by always casting to long.
1 parent e194dd6 commit c7f4af4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Modules/_multiprocessing/semaphore.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ semlock_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
433433
return NULL;
434434
}
435435

436-
PyOS_snprintf(buffer, sizeof(buffer), "/mp%d-%d", getpid(), counter++);
436+
PyOS_snprintf(buffer, sizeof(buffer), "/mp%ld-%d", (long)getpid(), counter++);
437437

438438
SEM_CLEAR_ERROR();
439439
handle = SEM_CREATE(buffer, value, maxvalue);

0 commit comments

Comments
 (0)