Skip to content

Commit 791cf14

Browse files
committed
suppress clang parentheses warnings on conditional of assignment
1 parent 6ba391e commit 791cf14

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

GLFW.xs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1256,11 +1256,11 @@ glfwSetWindowIcon(GLFWwindow* window, ...);
12561256
image = ST(n+1);
12571257
if ( SvROK(image) && SvTYPE(SvRV(image))==SVt_PVHV) {
12581258
imghv = (HV *)SvRV(image);
1259-
if (svp = hv_fetch(imghv, "width", 5, 0))
1259+
if ((svp = hv_fetch(imghv, "width", 5, 0)))
12601260
(imgstruct+n)->width = width = SvIV(*svp);
1261-
if (svp = hv_fetch(imghv, "height", 6, 0))
1261+
if ((svp = hv_fetch(imghv, "height", 6, 0)))
12621262
(imgstruct+n)->height = height = SvIV(*svp);
1263-
if (svp = hv_fetch(imghv, "pixels", 6, 0))
1263+
if ((svp = hv_fetch(imghv, "pixels", 6, 0)))
12641264
(imgstruct+n)->pixels = pixels = (unsigned char *)SvPV_nolen(*svp);
12651265
images[n] = imgstruct+n;
12661266
} else {
@@ -1295,11 +1295,11 @@ glfwCreateCursor(SV* image, int xhot, int yhot);
12951295
if ( SvROK(image) && SvTYPE(SvRV(image))==SVt_PVHV) {
12961296
imghv = (HV *)SvRV(image);
12971297
}
1298-
if (svp = hv_fetch(imghv, "width", 5, 0))
1298+
if ((svp = hv_fetch(imghv, "width", 5, 0)))
12991299
imgstruct.width = width = SvIV(*svp);
1300-
if (svp = hv_fetch(imghv, "height", 6, 0))
1300+
if ((svp = hv_fetch(imghv, "height", 6, 0)))
13011301
imgstruct.height = height = SvIV(*svp);
1302-
if (svp = hv_fetch(imghv, "pixels", 6, 0))
1302+
if ((svp = hv_fetch(imghv, "pixels", 6, 0)))
13031303
imgstruct.pixels = pixels = (unsigned char *)SvPV_nolen(*svp);
13041304
RETVAL = glfwCreateCursor(&imgstruct, xhot, yhot);
13051305
OUTPUT:
@@ -1385,13 +1385,13 @@ glfwSetGammaRamp(GLFWmonitor* monitor, SV* ramp);
13851385
if ( SvROK(ramp) && SvTYPE(SvRV(ramp))==SVt_PVHV) {
13861386
ramphv = (HV *)SvRV(ramp);
13871387
}
1388-
if (svp = hv_fetch(ramphv, "size", 4, 0))
1388+
if ((svp = hv_fetch(ramphv, "size", 4, 0)))
13891389
rampstruct.size = size = SvIV(*svp);
1390-
if (svp = hv_fetch(ramphv, "red", 3, 0))
1390+
if ((svp = hv_fetch(ramphv, "red", 3, 0)))
13911391
rampstruct.red = (unsigned short *)SvPV_nolen(*svp);
1392-
if (svp = hv_fetch(ramphv, "green", 5, 0))
1392+
if ((svp = hv_fetch(ramphv, "green", 5, 0)))
13931393
rampstruct.green = (unsigned short *)SvPV_nolen(*svp);
1394-
if (svp = hv_fetch(ramphv, "blue", 4, 0))
1394+
if ((svp = hv_fetch(ramphv, "blue", 4, 0)))
13951395
rampstruct.blue = (unsigned short *)SvPV_nolen(*svp);
13961396
glfwSetGammaRamp(monitor,&rampstruct);
13971397

0 commit comments

Comments
 (0)