Skip to content

Commit

Permalink
vcardcomponent.c: silence Windows compiler complaints
Browse files Browse the repository at this point in the history
  • Loading branch information
ksmurchison committed May 7, 2024
1 parent 7651624 commit d30de6d
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/libicalvcard/vcardcomponent.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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 };
Expand Down Expand Up @@ -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';
Expand All @@ -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 };
Expand Down

0 comments on commit d30de6d

Please sign in to comment.