From d30de6dc76bc93a4f0d1f1f0d16553322cedd18b Mon Sep 17 00:00:00 2001 From: Ken Murchison Date: Tue, 7 May 2024 12:12:28 -0400 Subject: [PATCH] vcardcomponent.c: silence Windows compiler complaints --- src/libicalvcard/vcardcomponent.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/libicalvcard/vcardcomponent.c b/src/libicalvcard/vcardcomponent.c index 85d095172..2343787f9 100755 --- a/src/libicalvcard/vcardcomponent.c +++ b/src/libicalvcard/vcardcomponent.c @@ -942,7 +942,7 @@ static void comp_to_v4(vcardcomponent *impl) buf_ptr = mediatype + size; icalmemory_append_string(&mediatype, &buf_ptr, &size, type->xvalue); - for (char *c = mediatype; (*c = tolower(*c)); c++); + for (char *c = mediatype; (*c = (char) tolower(*c)); c++); /* Remove this TYPE */ vcardenumarray_remove_element_at(types, i); @@ -1070,7 +1070,7 @@ static void comp_to_v3(vcardcomponent *impl) if ((subtype = strchr(mediatype, '/'))) { /* Copy and uppercase the subtype */ subtype = icalmemory_strdup(subtype + 1); - for (char *c = subtype; (*c = toupper(*c)); c++); + for (char *c = subtype; (*c = (char) toupper(*c)); c++); /* Add TYPE parameter */ vcardenumarray_element type = { .xvalue = subtype }; @@ -1123,8 +1123,7 @@ static void comp_to_v3(vcardcomponent *impl) base64 = strstr(mediatype, ";base64,"); if (base64) { - vcardparameter *param = - vcardparameter_new_encoding(VCARD_ENCODING_B); + param = vcardparameter_new_encoding(VCARD_ENCODING_B); vcardproperty_add_parameter(prop, param); *base64 = '\0'; @@ -1136,7 +1135,7 @@ static void comp_to_v3(vcardcomponent *impl) if ((subtype = strchr(mediatype, '/'))) { /* Copy and uppercase the subtype */ - for (char *c = ++subtype; (*c = toupper(*c)); c++); + for (char *c = ++subtype; (*c = (char) toupper(*c)); c++); /* Add TYPE parameter */ vcardenumarray_element type = { .xvalue = subtype };