Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/bsd/tmux/dist cast pointers to uintptr_t, not uint6...
details: https://anonhg.NetBSD.org/src/rev/93db8af45b94
branches: trunk
changeset: 356798:93db8af45b94
user: kre <kre%NetBSD.org@localhost>
date: Fri Oct 13 09:43:50 2017 +0000
description:
cast pointers to uintptr_t, not uint64_t - then allow integer promotions
take care of any size differences.
Should fix builds of systems with 32 bit pointers (i386 et al).
diffstat:
external/bsd/tmux/dist/window-client.c | 2 +-
external/bsd/tmux/dist/window-tree.c | 12 ++++++------
2 files changed, 7 insertions(+), 7 deletions(-)
diffs (59 lines):
diff -r ae2e8f19ba96 -r 93db8af45b94 external/bsd/tmux/dist/window-client.c
--- a/external/bsd/tmux/dist/window-client.c Fri Oct 13 08:17:44 2017 +0000
+++ b/external/bsd/tmux/dist/window-client.c Fri Oct 13 09:43:50 2017 +0000
@@ -204,7 +204,7 @@
}
text = format_single(NULL, data->format, c, NULL, NULL, NULL);
- mode_tree_add(data->data, NULL, item, (uint64_t)c, c->name,
+ mode_tree_add(data->data, NULL, item, (uintptr_t)c, c->name,
text, -1);
free(text);
}
diff -r ae2e8f19ba96 -r 93db8af45b94 external/bsd/tmux/dist/window-tree.c
--- a/external/bsd/tmux/dist/window-tree.c Fri Oct 13 08:17:44 2017 +0000
+++ b/external/bsd/tmux/dist/window-tree.c Fri Oct 13 09:43:50 2017 +0000
@@ -235,7 +235,7 @@
text = format_single(NULL, data->format, NULL, s, wl, wp);
xasprintf(&name, "%u", idx);
- mode_tree_add(data->data, parent, item, (uint64_t)wp, name, text, -1);
+ mode_tree_add(data->data, parent, item, (uintptr_t)wp, name, text, -1);
free(text);
free(name);
}
@@ -283,7 +283,7 @@
expanded = 0;
else
expanded = 1;
- mti = mode_tree_add(data->data, parent, item, (uint64_t)wl, name, text,
+ mti = mode_tree_add(data->data, parent, item, (uintptr_t)wl, name, text,
expanded);
free(text);
free(name);
@@ -354,7 +354,7 @@
expanded = 0;
else
expanded = 1;
- mti = mode_tree_add(data->data, NULL, item, (uint64_t)s, s->name, text,
+ mti = mode_tree_add(data->data, NULL, item, (uintptr_t)s, s->name, text,
expanded);
free(text);
@@ -428,13 +428,13 @@
case WINDOW_TREE_NONE:
break;
case WINDOW_TREE_SESSION:
- *tag = (uint64_t)data->fs.s;
+ *tag = (uintptr_t)data->fs.s;
break;
case WINDOW_TREE_WINDOW:
- *tag = (uint64_t)data->fs.wl;
+ *tag = (uintptr_t)data->fs.wl;
break;
case WINDOW_TREE_PANE:
- *tag = (uint64_t)data->fs.wp;
+ *tag = (uintptr_t)data->fs.wp;
break;
}
}
Home |
Main Index |
Thread Index |
Old Index