summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Persch <chpe@src.gnome.org>2021-02-24 20:22:10 +0100
committerChristian Persch <chpe@src.gnome.org>2021-02-24 20:22:10 +0100
commit80f41f34519d3868314b65d36fe9312e61c62ca7 (patch)
tree0572ed524004d22f36b47c91c138bdf2845e341d
parentcca1224968245bd772cd3404342e36bbde265458 (diff)
downloadvte-80f41f34519d3868314b65d36fe9312e61c62ca7.tar.gz
all: Fix underalignment warnings
-rw-r--r--src/bidi.cc8
-rw-r--r--src/missing.cc2
-rw-r--r--src/vterowdata.cc2
3 files changed, 6 insertions, 6 deletions
diff --git a/src/bidi.cc b/src/bidi.cc
index c7e724ff..7adf74a4 100644
--- a/src/bidi.cc
+++ b/src/bidi.cc
@@ -258,7 +258,7 @@ BidiRunner::explicit_line_shape(vte::grid::row_t row)
/* Convenience stuff, we no longer need the auto-growing GArray wrapper. */
count = fribidi_chars_array->len;
- fribidi_chars = (FriBidiChar *) fribidi_chars_array->data;
+ fribidi_chars = reinterpret_cast<FriBidiChar*>(fribidi_chars_array->data);
/* Run the BiDi algorithm on the paragraph to get the embedding levels. */
fribidi_chartypes = g_newa (FriBidiCharType, count);
@@ -558,9 +558,9 @@ BidiRunner::implicit_paragraph(vte::grid::row_t start, vte::grid::row_t end, boo
/* Convenience stuff, we no longer need the auto-growing GArray wrapper. */
count = fribidi_chars_array->len;
- fribidi_chars = (FriBidiChar *) fribidi_chars_array->data;
- fribidi_map = (FriBidiStrIndex *) fribidi_map_array->data;
- fribidi_to_term = (FriBidiStrIndex *) fribidi_to_term_array->data;
+ fribidi_chars = reinterpret_cast<FriBidiChar*>(fribidi_chars_array->data);
+ fribidi_map = reinterpret_cast<FriBidiStrIndex*>(fribidi_map_array->data);
+ fribidi_to_term = reinterpret_cast<FriBidiStrIndex*>(fribidi_to_term_array->data);
/* Run the BiDi algorithm on the paragraph to get the embedding levels. */
fribidi_chartypes = g_newa (FriBidiCharType, count);
diff --git a/src/missing.cc b/src/missing.cc
index 3cf4654f..536b1e03 100644
--- a/src/missing.cc
+++ b/src/missing.cc
@@ -195,7 +195,7 @@ fdwalk(int (*cb)(void *data, int fd),
{
for (pos = 0; pos < nread; pos += de->d_reclen)
{
- de = (struct linux_dirent64 *)(buf + pos);
+ de = reinterpret_cast<struct linux_dirent64*>(buf + pos);
fd = filename_to_fd (de->d_name);
if (fd < 0 || fd == dir_fd)
diff --git a/src/vterowdata.cc b/src/vterowdata.cc
index b4234a75..17e14736 100644
--- a/src/vterowdata.cc
+++ b/src/vterowdata.cc
@@ -51,7 +51,7 @@ _vte_cells_for_cell_array (VteCell *cells)
if (G_UNLIKELY (!cells))
return NULL;
- return (VteCells *) (((guchar *) cells) - G_STRUCT_OFFSET (VteCells, cells));
+ return reinterpret_cast<VteCells*>(((guchar *) cells) - G_STRUCT_OFFSET (VteCells, cells));
}
static VteCells *