diff options
| author | Rich Felker <dalias@aerifal.cx> | 2011-02-14 19:37:01 -0500 | 
|---|---|---|
| committer | Rich Felker <dalias@aerifal.cx> | 2011-02-14 19:37:01 -0500 | 
| commit | a8c17e6587e68c4330999dd408d4add1d81296bf (patch) | |
| tree | 6764172bcc04e4e0b8c50f531244d3d8df696187 | |
| parent | c247ebdd989365d20da3ce41fdeb2002e0a1ba13 (diff) | |
| download | musl-a8c17e6587e68c4330999dd408d4add1d81296bf.tar.gz | |
fix some pointer signedness issues (this was invalid C)
| -rw-r--r-- | src/stdio/fgetwc.c | 4 | ||||
| -rw-r--r-- | src/stdio/fputws.c | 2 | 
2 files changed, 3 insertions, 3 deletions
| diff --git a/src/stdio/fgetwc.c b/src/stdio/fgetwc.c index c990545f..77b30fd1 100644 --- a/src/stdio/fgetwc.c +++ b/src/stdio/fgetwc.c @@ -12,7 +12,7 @@ wint_t __fgetwc_unlocked(FILE *f)  	/* Convert character from buffer if possible */  	if (f->rpos < f->rend) { -		l = mbrtowc(&wc, f->rpos, f->rend - f->rpos, &st); +		l = mbrtowc(&wc, (void *)f->rpos, f->rend - f->rpos, &st);  		if (l+2 >= 2) {  			f->rpos += l + !l; /* l==0 means 1 byte, null */  			return wc; @@ -30,7 +30,7 @@ wint_t __fgetwc_unlocked(FILE *f)  			if (!mbsinit(&st)) errno = EILSEQ;  			return WEOF;  		} -		l = mbrtowc(&wc, &b, 1, &st); +		l = mbrtowc(&wc, (void *)&b, 1, &st);  		if (l == -1) return WEOF;  	} diff --git a/src/stdio/fputws.c b/src/stdio/fputws.c index 9057853b..b75f95bc 100644 --- a/src/stdio/fputws.c +++ b/src/stdio/fputws.c @@ -9,7 +9,7 @@ int fputws(const wchar_t *ws, FILE *f)  	f->mode |= f->mode+1; -	while (ws && (l = wcsrtombs(buf, (void*)&ws, sizeof buf, 0))+1 > 1) +	while (ws && (l = wcsrtombs((void *)buf, (void*)&ws, sizeof buf, 0))+1 > 1)  		if (__fwritex(buf, l, f) < l) {  			FUNLOCK(f);  			return -1; | 
