diff --git a/src/core.c b/src/core.c index 2ba6f25..d4e7fe4 100644 --- a/src/core.c +++ b/src/core.c @@ -238,9 +238,9 @@ void MwLoop(MwWidget handle) { } void MwSetInteger(MwWidget handle, const char* key, int n) { - int xy = 0; + int xy; int wh = 0; - if((xy = (strcmp(key, MwNx) == 0 || strcmp(key, MwNy) == 0)) || (wh = (strcmp(key, MwNwidth) == 0 || strcmp(key, MwNheight) == 0))) { + if((xy = ((strcmp(key, MwNx) == 0 || strcmp(key, MwNy) == 0) ? 1 : 0)) || (wh = ((strcmp(key, MwNwidth) == 0 || strcmp(key, MwNheight) == 0)) ? 1 : 0)) { int x, y; unsigned int w, h; diff --git a/src/draw.c b/src/draw.c index 7d47fd5..53455c9 100644 --- a/src/draw.c +++ b/src/draw.c @@ -36,9 +36,9 @@ static int hex(const char* txt, int len) { } MwLLColor MwParseColor(MwWidget handle, const char* text) { - int r = 0; - int g = 0; - int b = 0; + int r; + int g; + int b; if(text[0] == '#' && strlen(text) == 4) { r = hex(text + 1, 1); diff --git a/src/unicode.c b/src/unicode.c index 9506d47..70a0afb 100644 --- a/src/unicode.c +++ b/src/unicode.c @@ -118,6 +118,4 @@ int MwUTF32ToUTF8(int input, char* output) { output[3] = 0x80 | (input & 0x3f); return 4; } - - return 0; } diff --git a/src/widget/viewport.c b/src/widget/viewport.c index ccec06f..7279bb6 100644 --- a/src/widget/viewport.c +++ b/src/widget/viewport.c @@ -14,6 +14,7 @@ static void vscroll_changed(MwWidget handle, void* user, void* call) { int mv = MwGetInteger(handle, MwNmaxValue); int l = MwGetInteger(vp->frame, MwNheight); v = (mv - l) * (double)v / mv; + (void)call; if(v < 0) v = 0; MwVaApply(vp->inframe, MwNy, -v, @@ -26,6 +27,7 @@ static void hscroll_changed(MwWidget handle, void* user, void* call) { int mv = MwGetInteger(handle, MwNmaxValue); int l = MwGetInteger(vp->frame, MwNwidth); v = (mv - l) * (double)v / mv; + (void)call; if(v < 0) v = 0; MwVaApply(vp->inframe, MwNx, -v,