Merge pull request #590 from mikkeloscar/i686-warnings

Use correct format string for x86_64 and i686
This commit is contained in:
Drew DeVault 2016-04-17 11:08:29 -04:00
commit 083316c5ce
5 changed files with 13 additions and 13 deletions

View file

@ -80,13 +80,13 @@ swayc_t *new_output(wlc_handle handle) {
swayc_t *op = root_container.children->items[i];
const char *op_name = op->name;
if (op_name && name && strcmp(op_name, name) == 0) {
sway_log(L_DEBUG, "restoring output %lu:%s", handle, op_name);
sway_log(L_DEBUG, "restoring output %" PRIuPTR ":%s", handle, op_name);
return op;
}
}
}
sway_log(L_DEBUG, "New output %lu:%s", handle, name);
sway_log(L_DEBUG, "New output %" PRIuPTR ":%s", handle, name);
struct output_config *oc = NULL, *all = NULL;
int i;
@ -254,7 +254,7 @@ swayc_t *new_view(swayc_t *sibling, wlc_handle handle) {
}
const char *title = wlc_view_get_title(handle);
swayc_t *view = new_swayc(C_VIEW);
sway_log(L_DEBUG, "Adding new view %lu:%s to container %p %d",
sway_log(L_DEBUG, "Adding new view %" PRIuPTR ":%s to container %p %d",
handle, title, sibling, sibling ? sibling->type : 0);
// Setup values
view->handle = handle;
@ -292,7 +292,7 @@ swayc_t *new_floating_view(wlc_handle handle) {
}
const char *title = wlc_view_get_title(handle);
swayc_t *view = new_swayc(C_VIEW);
sway_log(L_DEBUG, "Adding new view %lu:%x:%s as a floating view",
sway_log(L_DEBUG, "Adding new view %" PRIuPTR ":%x:%s as a floating view",
handle, wlc_view_get_type(handle), title);
// Setup values
view->handle = handle;
@ -354,7 +354,7 @@ swayc_t *destroy_output(swayc_t *output) {
arrange_windows(root_container.children->items[p], -1, -1);
}
}
sway_log(L_DEBUG, "OUTPUT: Destroying output '%lu'", output->handle);
sway_log(L_DEBUG, "OUTPUT: Destroying output '%" PRIuPTR "'", output->handle);
free_swayc(output);
return &root_container;
}

View file

@ -26,7 +26,7 @@ static void container_log(const swayc_t *c, int depth) {
fprintf(stderr,"|(%p)",c);
fprintf(stderr,"(p:%-8p)",c->parent);
fprintf(stderr,"(f:%-8p)",c->focused);
fprintf(stderr,"(h:%2ld)",c->handle);
fprintf(stderr,"(h:%2" PRIuPTR ")",c->handle);
fprintf(stderr,"Type:%-4s|",
c->type == C_ROOT ? "root" :
c->type == C_OUTPUT ? "op" :

View file

@ -105,7 +105,7 @@ bool set_focused_container(swayc_t *c) {
active_ws_child_count = active_ws->children->length + active_ws->floating->length;
}
swayc_log(L_DEBUG, c, "Setting focus to %p:%ld", c, c->handle);
swayc_log(L_DEBUG, c, "Setting focus to %p:%" PRIuPTR, c, c->handle);
// Get workspace for c, get that workspaces current focused container.
swayc_t *workspace = swayc_active_workspace_for(c);
@ -196,7 +196,7 @@ bool set_focused_container_for(swayc_t *a, swayc_t *c) {
return set_focused_container(c);
}
sway_log(L_DEBUG, "Setting focus for %p:%ld to %p:%ld",
sway_log(L_DEBUG, "Setting focus for %p:%" PRIuPTR " to %p:%" PRIuPTR,
a, a->handle, c, c->handle);
c->is_focused = true;

View file

@ -200,7 +200,7 @@ static bool handle_view_created(wlc_handle handle) {
}
}
}
sway_log(L_DEBUG, "handle:%ld type:%x state:%x parent:%ld "
sway_log(L_DEBUG, "handle:%" PRIuPTR " type:%x state:%x parent:%" PRIuPTR " "
"mask:%d (x:%d y:%d w:%d h:%d) title:%s "
"class:%s appid:%s",
handle, wlc_view_get_type(handle), wlc_view_get_state(handle), parent,
@ -277,7 +277,7 @@ static bool handle_view_created(wlc_handle handle) {
}
static void handle_view_destroyed(wlc_handle handle) {
sway_log(L_DEBUG, "Destroying window %lu", handle);
sway_log(L_DEBUG, "Destroying window %" PRIuPTR, handle);
swayc_t *view = swayc_by_handle(handle);
// destroy views by type
@ -339,7 +339,7 @@ static void handle_view_focus(wlc_handle view, bool focus) {
}
static void handle_view_geometry_request(wlc_handle handle, const struct wlc_geometry *geometry) {
sway_log(L_DEBUG, "geometry request for %ld %dx%d @ %d,%d", handle,
sway_log(L_DEBUG, "geometry request for %" PRIuPTR " %dx%d @ %d,%d", handle,
geometry->size.w, geometry->size.h, geometry->origin.x, geometry->origin.y);
// If the view is floating, then apply the geometry.
// Otherwise save the desired width/height for the view.
@ -366,7 +366,7 @@ static void handle_view_state_request(wlc_handle view, enum wlc_view_state_bit s
// i3 just lets it become fullscreen
wlc_view_set_state(view, state, toggle);
if (c) {
sway_log(L_DEBUG, "setting view %ld %s, fullscreen %d", view, c->name, toggle);
sway_log(L_DEBUG, "setting view %" PRIuPTR " %s, fullscreen %d", view, c->name, toggle);
arrange_windows(c->parent, -1, -1);
// Set it as focused window for that workspace if its going fullscreen
if (toggle) {

View file

@ -205,7 +205,7 @@ int ipc_client_handle_readable(int client_fd, uint32_t mask, void *data) {
client->payload_length = buf32[0];
client->current_command = (enum ipc_command_type)buf32[1];
if (read_available - received >= client->payload_length) {
if (read_available - received >= (long)client->payload_length) {
ipc_client_handle_command(client);
}