diff options
author | Dominique Pelle <dominique.pelle@gmail.com> | 2022-01-09 12:57:48 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-01-09 12:57:48 +0000 |
commit | c14f667626ba677a767d474324306e39096dc43e (patch) | |
tree | ef30800f9cf8e325e8ddf6d5bfe61b1e9b884abe /src/if_py_both.h | |
parent | f85a424c832777892c4efaff163c2fa710ce8d91 (diff) |
patch 8.2.4048: gcc complains about use of "%p" in printfv8.2.4048
Problem: gcc complains about use of "%p" in printf.
Solution: Add (void *) typecast. (Dominique Pellé, closes #9494)
Diffstat (limited to 'src/if_py_both.h')
-rw-r--r-- | src/if_py_both.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/if_py_both.h b/src/if_py_both.h index 8e349c55f8..6d7b9687ac 100644 --- a/src/if_py_both.h +++ b/src/if_py_both.h @@ -3789,14 +3789,14 @@ TabPageAttr(TabPageObject *self, char *name) TabPageRepr(TabPageObject *self) { if (self->tab == INVALID_TABPAGE_VALUE) - return PyString_FromFormat("<tabpage object (deleted) at %p>", (self)); + return PyString_FromFormat("<tabpage object (deleted) at %p>", (void *)self); else { int t = get_tab_number(self->tab); if (t == 0) return PyString_FromFormat("<tabpage object (unknown) at %p>", - (self)); + (void *)self); else return PyString_FromFormat("<tabpage %d>", t - 1); } @@ -4125,14 +4125,14 @@ WindowSetattr(WindowObject *self, char *name, PyObject *valObject) WindowRepr(WindowObject *self) { if (self->win == INVALID_WINDOW_VALUE) - return PyString_FromFormat("<window object (deleted) at %p>", (self)); + return PyString_FromFormat("<window object (deleted) at %p>", (void *)self); else { int w = get_win_number(self->win, firstwin); if (w == 0) return PyString_FromFormat("<window object (unknown) at %p>", - (self)); + (void *)self); else return PyString_FromFormat("<window %d>", w - 1); } @@ -5126,7 +5126,7 @@ RangeRepr(RangeObject *self) { if (self->buf->buf == INVALID_BUFFER_VALUE) return PyString_FromFormat("<range object (for deleted buffer) at %p>", - (self)); + (void *)self); else { char *name = (char *)self->buf->buf->b_fname; @@ -5378,7 +5378,7 @@ BufferRange(BufferObject *self, PyObject *args) BufferRepr(BufferObject *self) { if (self->buf == INVALID_BUFFER_VALUE) - return PyString_FromFormat("<buffer object (deleted) at %p>", self); + return PyString_FromFormat("<buffer object (deleted) at %p>", (void *)self); else { char *name = (char *)self->buf->b_fname; |