diff --git a/lib/ogsf/gsd_wire.c b/lib/ogsf/gsd_wire.c index 0da492b9b1..1b3b8e6c08 100644 --- a/lib/ogsf/gsd_wire.c +++ b/lib/ogsf/gsd_wire.c @@ -645,7 +645,7 @@ int gsd_coarse_surf_map(geosurf *surf) */ check_transp = 0; tratt = &(surf->att[ATT_TRANSP]); - ktrans = (255 << 24); + ktrans = (255U << 24); trans_src = surf->att[ATT_TRANSP].att_src; if (CONST_ATT == trans_src && surf->att[ATT_TRANSP].constant != 0.0) { @@ -798,7 +798,7 @@ int gsd_coarse_surf_map(geosurf *surf) if (check_transp) { GET_MAPATT(trbuff, offset2[ii], ttr); ktrans = (char)SCALE_ATT(tratt, ttr, 0, 255); - ktrans = (char)(255 - ktrans) << 24; + ktrans = (char)(255U - ktrans) << 24; } if (check_material) {