summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <sir@cmpwn.com>2015-08-16 22:16:09 -0400
committerLibravatar Drew DeVault <sir@cmpwn.com>2015-08-16 22:16:09 -0400
commitbe2635daa6b041de4dfb24952e96779a505b1b09 (patch)
tree2da12902f9b74735117a1f886b38c568102b74ec
parentMerge pull request #53 from taiyu-len/master (diff)
downloadsway-be2635daa6b041de4dfb24952e96779a505b1b09.tar.gz
sway-be2635daa6b041de4dfb24952e96779a505b1b09.tar.zst
sway-be2635daa6b041de4dfb24952e96779a505b1b09.zip
Fix format warnings
-rw-r--r--sway/container.c10
-rw-r--r--sway/handlers.c4
-rw-r--r--sway/workspace.c2
3 files changed, 8 insertions, 8 deletions
diff --git a/sway/container.c b/sway/container.c
index 3cf9e47a..4321b6ce 100644
--- a/sway/container.c
+++ b/sway/container.c
@@ -48,7 +48,7 @@ static void add_output_widths(swayc_t *container, void *_width) {
48swayc_t *new_output(wlc_handle handle) { 48swayc_t *new_output(wlc_handle handle) {
49 const struct wlc_size* size = wlc_output_get_resolution(handle); 49 const struct wlc_size* size = wlc_output_get_resolution(handle);
50 const char *name = wlc_output_get_name(handle); 50 const char *name = wlc_output_get_name(handle);
51 sway_log(L_DEBUG, "Added output %d %s", handle, name); 51 sway_log(L_DEBUG, "Added output %u %s", (unsigned int)handle, name);
52 52
53 swayc_t *output = new_swayc(C_OUTPUT); 53 swayc_t *output = new_swayc(C_OUTPUT);
54 output->width = size->w; 54 output->width = size->w;
@@ -73,7 +73,7 @@ swayc_t *new_output(wlc_handle handle) {
73} 73}
74 74
75swayc_t *new_workspace(swayc_t * output, const char *name) { 75swayc_t *new_workspace(swayc_t * output, const char *name) {
76 sway_log(L_DEBUG, "Added workspace %s for output %d", name, output->handle); 76 sway_log(L_DEBUG, "Added workspace %s for output %u", name, (unsigned int)output->handle);
77 swayc_t *workspace = new_swayc(C_WORKSPACE); 77 swayc_t *workspace = new_swayc(C_WORKSPACE);
78 78
79 workspace->layout = L_HORIZ; // TODO:default layout 79 workspace->layout = L_HORIZ; // TODO:default layout
@@ -127,8 +127,8 @@ swayc_t *new_container(swayc_t *child, enum swayc_layouts layout) {
127swayc_t *new_view(swayc_t *sibling, wlc_handle handle) { 127swayc_t *new_view(swayc_t *sibling, wlc_handle handle) {
128 const char *title = wlc_view_get_title(handle); 128 const char *title = wlc_view_get_title(handle);
129 swayc_t *view = new_swayc(C_VIEW); 129 swayc_t *view = new_swayc(C_VIEW);
130 sway_log(L_DEBUG, "Adding new view %d:%s to container %p %d", 130 sway_log(L_DEBUG, "Adding new view %u:%s to container %p %d",
131 handle, title, sibling, sibling?sibling->type:0); 131 (unsigned int)handle, title, sibling, sibling?sibling->type:0);
132 //Setup values 132 //Setup values
133 view->handle = handle; 133 view->handle = handle;
134 view->name = strdup(title); 134 view->name = strdup(title);
@@ -150,7 +150,7 @@ swayc_t *destroy_output(swayc_t *output) {
150 if (output->children->length == 0) { 150 if (output->children->length == 0) {
151 //TODO move workspaces to other outputs 151 //TODO move workspaces to other outputs
152 } 152 }
153 sway_log(L_DEBUG, "OUTPUT: Destroying output '%d'", output->handle); 153 sway_log(L_DEBUG, "OUTPUT: Destroying output '%u'", (unsigned int)output->handle);
154 free_swayc(output); 154 free_swayc(output);
155 return &root_container; 155 return &root_container;
156} 156}
diff --git a/sway/handlers.c b/sway/handlers.c
index 9ee4f3cb..3e83b850 100644
--- a/sway/handlers.c
+++ b/sway/handlers.c
@@ -68,7 +68,7 @@ static void handle_output_destroyed(wlc_handle output) {
68} 68}
69 69
70static void handle_output_resolution_change(wlc_handle output, const struct wlc_size *from, const struct wlc_size *to) { 70static void handle_output_resolution_change(wlc_handle output, const struct wlc_size *from, const struct wlc_size *to) {
71 sway_log(L_DEBUG, "Output %d resolution changed to %d x %d", output, to->w, to->h); 71 sway_log(L_DEBUG, "Output %u resolution changed to %d x %d", (unsigned int)output, to->w, to->h);
72 swayc_t *c = get_swayc_for_handle(output, &root_container); 72 swayc_t *c = get_swayc_for_handle(output, &root_container);
73 if (!c) return; 73 if (!c) return;
74 c->width = to->w; 74 c->width = to->w;
@@ -117,7 +117,7 @@ static bool handle_view_created(wlc_handle handle) {
117} 117}
118 118
119static void handle_view_destroyed(wlc_handle handle) { 119static void handle_view_destroyed(wlc_handle handle) {
120 sway_log(L_DEBUG, "Destroying window %d", handle); 120 sway_log(L_DEBUG, "Destroying window %u", (unsigned int)handle);
121 swayc_t *view = get_swayc_for_handle(handle, &root_container); 121 swayc_t *view = get_swayc_for_handle(handle, &root_container);
122 swayc_t *parent; 122 swayc_t *parent;
123 swayc_t *focused = get_focused_container(&root_container); 123 swayc_t *focused = get_focused_container(&root_container);
diff --git a/sway/workspace.c b/sway/workspace.c
index 9bc3215f..4db75f48 100644
--- a/sway/workspace.c
+++ b/sway/workspace.c
@@ -26,7 +26,7 @@ char *workspace_next_name(void) {
26 list_t *args = split_string(command, " "); 26 list_t *args = split_string(command, " ");
27 27
28 if (strcmp("workspace", args->items[0]) == 0 && args->length > 1) { 28 if (strcmp("workspace", args->items[0]) == 0 && args->length > 1) {
29 sway_log(L_DEBUG, "Got valid workspace command for target: '%s'", args->items[1]); 29 sway_log(L_DEBUG, "Got valid workspace command for target: '%s'", (char *)args->items[1]);
30 char* target = malloc(strlen(args->items[1]) + 1); 30 char* target = malloc(strlen(args->items[1]) + 1);
31 strcpy(target, args->items[1]); 31 strcpy(target, args->items[1]);
32 while (*target == ' ' || *target == '\t') 32 while (*target == ' ' || *target == '\t')