Cast con id as uintptr_t (#2298)
Use `uintptr_t` to cast the con id to int instead of `long int`. This type is guaranteed to hold the pointer as an int regardless of platform. fixes #2283
This commit is contained in:
committed by
Michael Stapelberg
parent
80dddd9961
commit
e690e3d483
@ -9,6 +9,7 @@
|
||||
* commands.c: all command functions (see commands_parser.c)
|
||||
*
|
||||
*/
|
||||
#include <stdint.h>
|
||||
#include <float.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
@ -1625,7 +1626,7 @@ void cmd_open(I3_CMD) {
|
||||
ystr("success");
|
||||
y(bool, true);
|
||||
ystr("id");
|
||||
y(integer, (long int)con);
|
||||
y(integer, (uintptr_t)con);
|
||||
y(map_close);
|
||||
|
||||
cmd_output->needs_tree_render = true;
|
||||
|
Reference in New Issue
Block a user