Module Name:    src
Committed By:   kre
Date:           Fri Oct 13 09:43:50 UTC 2017

Modified Files:
        src/external/bsd/tmux/dist: window-client.c window-tree.c

Log Message:
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).


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/bsd/tmux/dist/window-client.c \
    src/external/bsd/tmux/dist/window-tree.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/tmux/dist/window-client.c
diff -u src/external/bsd/tmux/dist/window-client.c:1.1.1.1 src/external/bsd/tmux/dist/window-client.c:1.2
--- src/external/bsd/tmux/dist/window-client.c:1.1.1.1	Thu Oct 12 21:59:49 2017
+++ src/external/bsd/tmux/dist/window-client.c	Fri Oct 13 09:43:50 2017
@@ -204,7 +204,7 @@ window_client_build(void *modedata, u_in
 		}
 
 		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);
 	}
Index: src/external/bsd/tmux/dist/window-tree.c
diff -u src/external/bsd/tmux/dist/window-tree.c:1.1.1.1 src/external/bsd/tmux/dist/window-tree.c:1.2
--- src/external/bsd/tmux/dist/window-tree.c:1.1.1.1	Thu Oct 12 21:59:49 2017
+++ src/external/bsd/tmux/dist/window-tree.c	Fri Oct 13 09:43:50 2017
@@ -235,7 +235,7 @@ window_tree_build_pane(struct session *s
 	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 @@ window_tree_build_window(struct session 
 		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 @@ window_tree_build_session(struct session
 		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 @@ window_tree_build(void *modedata, u_int 
 	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;
 	}
 }

Reply via email to