]> granicus.if.org Git - python/commitdiff
bpo-38321: Fix compiler warning in _randommodule.c (GH-16512)
authorVictor Stinner <vstinner@redhat.com>
Tue, 1 Oct 2019 10:45:52 +0000 (12:45 +0200)
committerGitHub <noreply@github.com>
Tue, 1 Oct 2019 10:45:52 +0000 (12:45 +0200)
Fix the GCC warning: "initialization discards â€˜const’ qualifier from
pointer target type".

Modules/_randommodule.c

index 1ea2bf28abccad1fb1bee6c0b05a193be401be1a..1f4bf74fc7a1e205d46f001c4c215c3e48b07ca0 100644 (file)
@@ -543,7 +543,7 @@ PyDoc_STRVAR(random_doc,
 "Random() -> create a random number generator with its own internal state.");
 
 static PyType_Slot Random_Type_slots[] = {
-    {Py_tp_doc, random_doc},
+    {Py_tp_doc, (void *)random_doc},
     {Py_tp_methods, random_methods},
     {Py_tp_new, random_new},
     {Py_tp_free, PyObject_Free},