Add some casts for gcc 4.8.3 with more-than-default warnings enabled.
diff --git a/lib/zip_file_set_external_attributes.c b/lib/zip_file_set_external_attributes.c index 61623d2..c06891f 100644 --- a/lib/zip_file_set_external_attributes.c +++ b/lib/zip_file_set_external_attributes.c
@@ -51,7 +51,7 @@ e = za->entry+idx; - unchanged_opsys = e->orig ? e->orig->version_madeby>>8 : ZIP_OPSYS_DEFAULT; + unchanged_opsys = e->orig ? (zip_uint8_t)(e->orig->version_madeby>>8) : ZIP_OPSYS_DEFAULT; unchanged_attributes = e->orig ? e->orig->ext_attrib : ZIP_EXT_ATTRIB_DEFAULT; changed = (opsys != unchanged_opsys || attributes != unchanged_attributes); @@ -63,7 +63,7 @@ return -1; } } - e->changes->version_madeby = (zip_uint16_t)(opsys << 8) | (e->changes->version_madeby & 0xff); + e->changes->version_madeby = (zip_uint16_t)((opsys << 8) | (e->changes->version_madeby & 0xff)); e->changes->ext_attrib = attributes; e->changes->changed |= ZIP_DIRENT_ATTRIBUTES; } @@ -74,7 +74,8 @@ e->changes = NULL; } else { - e->changes->version_madeby = (zip_uint16_t)(unchanged_opsys << 8) | (e->changes->version_madeby & 0xff); + e->changes->version_madeby = (zip_uint16_t)((unchanged_opsys << 8) | (e->changes->version_madeby & 0xff)) +; e->changes->ext_attrib = unchanged_attributes; } }