Skip to content

Commit 9e0afb7

Browse files
jcai19Skia Commit-Bot
authored andcommitted
Fix clang warnings
Explicitly convert unsigned int to uint64_t before converting them to uint16x4_t or uint8x8_t. BUG=chromium:1035559 Change-Id: I7d0084c1ab9393063a15972a714d89db4e5e1afe Reviewed-on: https://skia-review.googlesource.com/c/skia/+/260981 Reviewed-by: Mike Klein <[email protected]> Commit-Queue: Mike Klein <[email protected]>
1 parent 84f13d0 commit 9e0afb7

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/opts/SkBitmapProcState_opts.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ static void decode_packed_coordinates_and_weight(U32 packed, Out* v0, Out* v1, O
428428
tmp = vmul_u16(tmp, vscale); // multiply result by scale
429429
}
430430
431-
vres = vshrn_n_u16(vcombine_u16(tmp, vcreate_u16(0)), 8); // shift down result by 8
431+
vres = vshrn_n_u16(vcombine_u16(tmp, vcreate_u16((uint64_t)0)), 8); // shift down result by 8
432432
vst1_lane_u32(dst, vreinterpret_u32_u8(vres), 0); // store result
433433
}
434434
#else

src/opts/SkBlitRow_opts.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ void blit_row_s32a_opaque(SkPMColor* dst, const SkPMColor* src, int len, U8CPU a
354354
}
355355

356356
if (len != 0) {
357-
uint8x8_t result = SkPMSrcOver_neon2(vcreate_u8(*dst), vcreate_u8(*src));
357+
uint8x8_t result = SkPMSrcOver_neon2(vcreate_u8((uint64_t)*dst), vcreate_u8((uint64_t)*src));
358358
vst1_lane_u32(dst, vreinterpret_u32_u8(result), 0);
359359
}
360360
return;

0 commit comments

Comments
 (0)