Merge pull request #230 from rkta/warnings

Fix some more warnings
This commit is contained in:
Tatsuya Kinoshita
2022-04-19 19:59:44 +09:00
committed by GitHub
2 changed files with 3 additions and 3 deletions

View File

@@ -120,7 +120,7 @@ int
wtf_strwidth(wc_uchar *p) wtf_strwidth(wc_uchar *p)
{ {
int w = 0; int w = 0;
wc_uchar *q = p + strlen(p); wc_uchar *q = p + strlen((char *)p);
while (p < q) { while (p < q) {
w += wtf_width(p); w += wtf_width(p);
@@ -146,7 +146,7 @@ size_t
wtf_len(wc_uchar *p) wtf_len(wc_uchar *p)
{ {
wc_uchar *q = p; wc_uchar *q = p;
wc_uchar *strz = p + strlen(p); wc_uchar *strz = p + strlen((char *)p);
q += WTF_LEN_MAP[*q]; q += WTF_LEN_MAP[*q];
while (q < strz && ! WTF_WIDTH_MAP[*q]) while (q < strz && ! WTF_WIDTH_MAP[*q])

View File

@@ -698,8 +698,8 @@ static int
x11_get_image_size(w3mimg_op * self, W3MImage * img, char *fname, int *w, x11_get_image_size(w3mimg_op * self, W3MImage * img, char *fname, int *w,
int *h) int *h)
{ {
struct x11_info *xi;
#if defined(USE_IMLIB) #if defined(USE_IMLIB)
struct x11_info *xi;
ImlibImage *im; ImlibImage *im;
#elif defined(USE_IMLIB2) #elif defined(USE_IMLIB2)
Imlib_Image im; Imlib_Image im;