From 1ae01af452006765c278878c80c614b50607014e Mon Sep 17 00:00:00 2001 From: Andrew Corrigan Date: Sat, 5 Nov 2016 12:19:31 -0400 Subject: [PATCH] suppresses all warnings reported by Apple LLVM version 8.0.0 (clang-800.0.42.1) --- src/nanovg.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/src/nanovg.c b/src/nanovg.c index 149886b..675fa47 100644 --- a/src/nanovg.c +++ b/src/nanovg.c @@ -263,6 +263,11 @@ static NVGcompositeOperationState nvg__compositeOperationState(int op) sfactor = NVG_ONE_MINUS_DST_ALPHA; dfactor = NVG_ONE_MINUS_SRC_ALPHA; } + else + { + sfactor = NVG_ONE; + dfactor = NVG_ZERO; + } NVGcompositeOperationState state; state.srcRGB = sfactor; @@ -461,7 +466,7 @@ NVGcolor nvgLerpRGBA(NVGcolor c0, NVGcolor c1, float u) { int i; float oneminu; - NVGcolor cint = {0}; + NVGcolor cint = {{{0}}}; u = nvg__clampf(u, 0.0f, 1.0f); oneminu = 1.0f - u; @@ -2617,12 +2622,12 @@ int nvgTextBreakLines(NVGcontext* ctx, const char* string, const char* end, floa type = NVG_NEWLINE; break; default: - if (iter.codepoint >= 0x4E00 && iter.codepoint <= 0x9FFF || - iter.codepoint >= 0x3000 && iter.codepoint <= 0x30FF || - iter.codepoint >= 0xFF00 && iter.codepoint <= 0xFFEF || - iter.codepoint >= 0x1100 && iter.codepoint <= 0x11FF || - iter.codepoint >= 0x3130 && iter.codepoint <= 0x318F || - iter.codepoint >= 0xAC00 && iter.codepoint <= 0xD7AF) + if ((iter.codepoint >= 0x4E00 && iter.codepoint <= 0x9FFF) || + (iter.codepoint >= 0x3000 && iter.codepoint <= 0x30FF) || + (iter.codepoint >= 0xFF00 && iter.codepoint <= 0xFFEF) || + (iter.codepoint >= 0x1100 && iter.codepoint <= 0x11FF) || + (iter.codepoint >= 0x3130 && iter.codepoint <= 0x318F) || + (iter.codepoint >= 0xAC00 && iter.codepoint <= 0xD7AF)) type = NVG_CJK_CHAR; else type = NVG_CHAR;