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

Skip to content

Commit 44e7ff2

Browse files
committed
gh-116386: Fix format string "%ld" warning in _xxinterpqueuesmodule
1 parent e205c5c commit 44e7ff2

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Modules/_xxinterpqueuesmodule.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -230,25 +230,25 @@ resolve_module_errcode(module_state *state, int errcode, int64_t qid,
230230
break;
231231
case ERR_QUEUE_NOT_FOUND:
232232
exctype = state->QueueNotFoundError;
233-
msg = PyUnicode_FromFormat("queue %" PRId64 " not found", qid);
233+
msg = PyUnicode_FromFormat("queue %" PRId64 " not found", (long long)qid);
234234
break;
235235
case ERR_QUEUE_EMPTY:
236236
if (ensure_external_exc_types(state) < 0) {
237237
return -1;
238238
}
239239
exctype = state->QueueEmpty;
240-
msg = PyUnicode_FromFormat("queue %" PRId64 " is empty", qid);
240+
msg = PyUnicode_FromFormat("queue %" PRId64 " is empty", (long long)qid);
241241
break;
242242
case ERR_QUEUE_FULL:
243243
if (ensure_external_exc_types(state) < 0) {
244244
return -1;
245245
}
246246
exctype = state->QueueFull;
247-
msg = PyUnicode_FromFormat("queue %" PRId64 " is full", qid);
247+
msg = PyUnicode_FromFormat("queue %" PRId64 " is full", (long long)qid);
248248
break;
249249
case ERR_QUEUE_NEVER_BOUND:
250250
exctype = state->QueueError;
251-
msg = PyUnicode_FromFormat("queue %" PRId64 " never bound", qid);
251+
msg = PyUnicode_FromFormat("queue %" PRId64 " never bound", (long long)qid);
252252
break;
253253
default:
254254
PyErr_Format(PyExc_ValueError,
@@ -750,7 +750,7 @@ _queuerefs_clear(_queueref *head)
750750

751751
#ifdef Py_DEBUG
752752
int64_t qid = ref->qid;
753-
fprintf(stderr, "queue %" PRId64 " still exists\n", qid);
753+
fprintf(stderr, "queue %" PRId64 " still exists\n", (long long)qid);
754754
#endif
755755
_queue *queue = ref->queue;
756756
GLOBAL_FREE(ref);
@@ -759,7 +759,7 @@ _queuerefs_clear(_queueref *head)
759759
#ifdef Py_DEBUG
760760
if (queue->items.count > 0) {
761761
fprintf(stderr, "queue %" PRId64 " still holds %" PRId64 " items\n",
762-
qid, queue->items.count);
762+
(long long)qid, (long long)queue->items.count);
763763
}
764764
#endif
765765
_queue_free(queue);

0 commit comments

Comments
 (0)