-Wwrite-strings: The Rest
[deliverable/binutils-gdb.git] / gdb / python / py-inferior.c
index 4b43c54e843e8fbc8493da036f8cab8506362e02..3d2cb1ddbeb38d53dd63cb3b3884e9b0f5d266f1 100644 (file)
@@ -576,7 +576,10 @@ get_buffer (PyObject *self, Py_buffer *buf, int flags)
   ret = PyBuffer_FillInfo (buf, self, membuf_obj->buffer,
                           membuf_obj->length, 0,
                           PyBUF_CONTIG);
-  buf->format = "c";
+
+  /* Despite the documentation saying this field is a "const char *",
+     in Python 3.4 at least, it's really a "char *".  */
+  buf->format = (char *) "c";
 
   return ret;
 }
This page took 0.025413 seconds and 4 git commands to generate.