[hackers] [wmii] Cast iconv's second arg void, because of differing prototypes.

From: Kris Maglione <jg_AT_suckless.org>
Date: Fri, 01 Jun 2007 01:09:34 -0000

changeset: 2096:c978579264ac
user: Kris Maglione <jg_AT_suckless.org>
date: Wed Apr 18 16:37:21 2007 -0400
summary: Cast iconv's second arg void, because of differing prototypes.

diff -r a5287d1b6225 -r c978579264ac cmd/wmii/fns.h
--- a/cmd/wmii/fns.h Wed Apr 18 16:30:21 2007 -0400
+++ b/cmd/wmii/fns.h Wed Apr 18 16:37:21 2007 -0400
@@ -216,5 +216,5 @@ char* utfrrune(char*, long);
 char* utfrrune(char*, long);
 char* utfrune(char*, long);
 char* utfutf(char*, char*);
-char* toutf8n(const char*, int);
-char* toutf8(const char*);
+char* toutf8n(char*, int);
+char* toutf8(char*);
diff -r a5287d1b6225 -r c978579264ac cmd/wmii/utf.c
--- a/cmd/wmii/utf.c Wed Apr 18 16:30:21 2007 -0400
+++ b/cmd/wmii/utf.c Wed Apr 18 16:37:21 2007 -0400
@@ -321,7 +321,7 @@ utfutf(char *s1, char *s2)
 }
 
 char*
-toutf8n(const char *str, int nstr) {
+toutf8n(char *str, int nstr) {
         static iconv_t cd;
         char *buf, *pos;
         int nbuf, bsize;
@@ -334,7 +334,7 @@ toutf8n(const char *str, int nstr) {
         buf = emalloc(bsize);
         pos = buf;
         nbuf = bsize-1;
- while(iconv(cd, &str, &nstr, &pos, &nbuf) == -1)
+ while(iconv(cd, (void*)&str, &nstr, &pos, &nbuf) == -1)
                 if(errno == E2BIG) {
                         bsize *= 1.25;
                         nbuf = pos - buf;
@@ -348,6 +348,6 @@ toutf8n(const char *str, int nstr) {
 }
 
 char*
-toutf8(const char *str) {
+toutf8(char *str) {
         return toutf8n(str, strlen(str));
 }
Received on Fri Jun 01 2007 - 03:09:33 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 15:56:57 UTC