Fix the warning on SUS-compatible systems (char**) and on NetBSD (const char**)
This commit is contained in:
parent
f85990b27a
commit
4e12c9b39c
|
@ -34,7 +34,7 @@ void *scalloc(size_t size);
|
||||||
char *sstrdup(const char *str);
|
char *sstrdup(const char *str);
|
||||||
void start_application(const char *command);
|
void start_application(const char *command);
|
||||||
void check_error(xcb_connection_t *conn, xcb_void_cookie_t cookie, char *err_message);
|
void check_error(xcb_connection_t *conn, xcb_void_cookie_t cookie, char *err_message);
|
||||||
char *convert_utf8_to_ucs2(const char *input, int *real_strlen);
|
char *convert_utf8_to_ucs2(char *input, int *real_strlen);
|
||||||
void remove_client_from_container(xcb_connection_t *conn, Client *client, Container *container);
|
void remove_client_from_container(xcb_connection_t *conn, Client *client, Container *container);
|
||||||
void set_focus(xcb_connection_t *conn, Client *client);
|
void set_focus(xcb_connection_t *conn, Client *client);
|
||||||
void leave_stack_mode(xcb_connection_t *conn, Container *container);
|
void leave_stack_mode(xcb_connection_t *conn, Container *container);
|
||||||
|
|
|
@ -145,7 +145,7 @@ void check_error(xcb_connection_t *conn, xcb_void_cookie_t cookie, char *err_mes
|
||||||
* returned. It has to be freed when done.
|
* returned. It has to be freed when done.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
char *convert_utf8_to_ucs2(const char *input, int *real_strlen) {
|
char *convert_utf8_to_ucs2(char *input, int *real_strlen) {
|
||||||
size_t input_size = strlen(input) + 1;
|
size_t input_size = strlen(input) + 1;
|
||||||
/* UCS-2 consumes exactly two bytes for each glyph */
|
/* UCS-2 consumes exactly two bytes for each glyph */
|
||||||
int buffer_size = input_size * 2;
|
int buffer_size = input_size * 2;
|
||||||
|
@ -169,7 +169,7 @@ char *convert_utf8_to_ucs2(const char *input, int *real_strlen) {
|
||||||
iconv(conversion_descriptor, NULL, NULL, NULL, NULL);
|
iconv(conversion_descriptor, NULL, NULL, NULL, NULL);
|
||||||
|
|
||||||
/* Convert our text */
|
/* Convert our text */
|
||||||
int rc = iconv(conversion_descriptor, &input, &input_size, &output, &output_size);
|
int rc = iconv(conversion_descriptor, (void*)&input, &input_size, &output, &output_size);
|
||||||
if (rc == (size_t)-1) {
|
if (rc == (size_t)-1) {
|
||||||
fprintf(stderr, "Converting to UCS-2 failed\n");
|
fprintf(stderr, "Converting to UCS-2 failed\n");
|
||||||
perror("erron\n");
|
perror("erron\n");
|
||||||
|
|
Loading…
Reference in New Issue