diff options
author | Thomas Klausner <wiz@NetBSD.org> | 2012-08-26 00:07:52 +0200 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2012-08-25 20:14:36 -0700 |
commit | 53564df46e7f8e443c46b00080ea46c878c34263 (patch) | |
tree | 43d2611de97984deb322a651c79d889fdba07e9d | |
parent | 1279ed652f9f3408211c78b7bf8a0aef6b8488df (diff) |
Get rid of a number of warnings.
Signed-off-by: Thomas Klausner <wiz@NetBSD.org>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r-- | xwininfo.c | 38 |
1 files changed, 19 insertions, 19 deletions
@@ -251,7 +251,7 @@ static Bool window_id_format_dec = False; static iconv_t iconv_from_utf8; #endif static const char *user_encoding; -static void print_utf8 (const char *, char *, size_t, const char *); +static void print_utf8 (const char *, const char *, size_t, const char *); static char *get_friendly_name (const char *, const char *); static xcb_connection_t *dpy; @@ -325,12 +325,12 @@ static int bp = 0, bmm = 0; static int english = 0, metric = 0; static void -scale_init (xcb_screen_t *screen) +scale_init (xcb_screen_t *scale_screen) { - xp = screen->width_in_pixels; - yp = screen->height_in_pixels; - xmm = screen->width_in_millimeters; - ymm = screen->height_in_millimeters; + xp = scale_screen->width_in_pixels; + yp = scale_screen->height_in_pixels; + xmm = scale_screen->width_in_millimeters; + ymm = scale_screen->height_in_millimeters; bp = xp + yp; bmm = xmm + ymm; } @@ -705,10 +705,10 @@ fetch_win_attributes (struct wininfo *w) #ifndef USE_XCB_ICCCM static Bool -wm_size_hints_reply (xcb_connection_t *dpy, xcb_get_property_cookie_t cookie, - wm_size_hints_t *hints_return, xcb_generic_error_t **err) +wm_size_hints_reply (xcb_connection_t *wshr_dpy, xcb_get_property_cookie_t cookie, + wm_size_hints_t *hints_return, xcb_generic_error_t **wshr_err) { - xcb_get_property_reply_t *prop = xcb_get_property_reply (dpy, cookie, err); + xcb_get_property_reply_t *prop = xcb_get_property_reply (wshr_dpy, cookie, wshr_err); int length; if (!prop || (prop->type != XCB_ATOM_WM_SIZE_HINTS) || @@ -843,7 +843,7 @@ Display_Window_Id (struct wininfo *w, Bool newline_wanted) if (wm_name_encoding == XCB_ATOM_STRING) { printf (" \"%.*s\"", wm_name_len, wm_name); } else if (wm_name_encoding == atom_utf8_string) { - print_utf8 (" \"", (char *) wm_name, wm_name_len, "\""); + print_utf8 (" \"", wm_name, wm_name_len, "\""); } else { /* Encodings we don't support, including COMPOUND_TEXT */ const char *enc_name = Get_Atom_Name (dpy, wm_name_encoding); @@ -1609,10 +1609,10 @@ static const binding _state_hints[] = { #ifndef USE_XCB_ICCCM static Bool -wm_hints_reply (xcb_connection_t *dpy, xcb_get_property_cookie_t cookie, - wm_hints_t *hints_return, xcb_generic_error_t **err) +wm_hints_reply (xcb_connection_t *whr_dpy, xcb_get_property_cookie_t cookie, + wm_hints_t *hints_return, xcb_generic_error_t **whr_err) { - xcb_get_property_reply_t *prop = xcb_get_property_reply (dpy, cookie, err); + xcb_get_property_reply_t *prop = xcb_get_property_reply (whr_dpy, cookie, whr_err); int length; if (!prop || (prop->type != XCB_ATOM_WM_HINTS) || (prop->format != 32)) { @@ -1779,16 +1779,16 @@ wininfo_wipe (struct wininfo *w) /* Gets UTF-8 encoded EMWH property _NET_WM_NAME for a window */ static xcb_get_property_cookie_t -get_net_wm_name (xcb_connection_t *dpy, xcb_window_t win) +get_net_wm_name (xcb_connection_t *gnwn_dpy, xcb_window_t win) { if (!atom_net_wm_name) - atom_net_wm_name = Get_Atom (dpy, "_NET_WM_NAME"); + atom_net_wm_name = Get_Atom (gnwn_dpy, "_NET_WM_NAME"); if (!atom_utf8_string) - atom_utf8_string = Get_Atom (dpy, "UTF8_STRING"); + atom_utf8_string = Get_Atom (gnwn_dpy, "UTF8_STRING"); if (atom_net_wm_name && atom_utf8_string) - return xcb_get_property (dpy, False, win, atom_net_wm_name, + return xcb_get_property (gnwn_dpy, False, win, atom_net_wm_name, atom_utf8_string, 0, BUFSIZ); else { xcb_get_property_cookie_t dummy = { 0 }; @@ -1879,7 +1879,7 @@ is_valid_utf8 (const char *string, int len) * Length of the string is specified in bytes, or -1 for going until '\0' */ static void -print_utf8 (const char *prefix, char *u8str, size_t length, const char *suffix) +print_utf8 (const char *prefix, const char *u8str, size_t length, const char *suffix) { size_t inlen = length; @@ -1964,7 +1964,7 @@ get_friendly_name (const char *string, const char *prefix) } else if (first) { first = False; } else { - *n = tolower(*n); + *n = tolower((unsigned char)*n); } } |