Fix a few compiler warnings with OS X / clang.

This commit is contained in:
Brecht Van Lommel
2016-04-17 00:51:29 +02:00
parent 667a5ef48e
commit 1dfbcd88d5
4 changed files with 7 additions and 3 deletions

View File

@@ -154,6 +154,7 @@ template<typename T> struct texture_image {
break; break;
default: default:
kernel_assert(0); kernel_assert(0);
return make_float4(0.0f, 0.0f, 0.0f, 0.0f);
} }
return read(data[ix + iy*width]); return read(data[ix + iy*width]);
} }
@@ -183,6 +184,7 @@ template<typename T> struct texture_image {
break; break;
default: default:
kernel_assert(0); kernel_assert(0);
return make_float4(0.0f, 0.0f, 0.0f, 0.0f);
} }
float4 r = (1.0f - ty)*(1.0f - tx)*read(data[ix + iy*width]); float4 r = (1.0f - ty)*(1.0f - tx)*read(data[ix + iy*width]);
@@ -231,6 +233,7 @@ template<typename T> struct texture_image {
break; break;
default: default:
kernel_assert(0); kernel_assert(0);
return make_float4(0.0f, 0.0f, 0.0f, 0.0f);
} }
const int xc[4] = {pix, ix, nix, nnix}; const int xc[4] = {pix, ix, nix, nnix};
@@ -298,6 +301,7 @@ template<typename T> struct texture_image {
break; break;
default: default:
kernel_assert(0); kernel_assert(0);
return make_float4(0.0f, 0.0f, 0.0f, 0.0f);
} }
return read(data[ix + iy*width + iz*width*height]); return read(data[ix + iy*width + iz*width*height]);
@@ -335,6 +339,7 @@ template<typename T> struct texture_image {
break; break;
default: default:
kernel_assert(0); kernel_assert(0);
return make_float4(0.0f, 0.0f, 0.0f, 0.0f);
} }
float4 r; float4 r;
@@ -402,6 +407,7 @@ template<typename T> struct texture_image {
break; break;
default: default:
kernel_assert(0); kernel_assert(0);
return make_float4(0.0f, 0.0f, 0.0f, 0.0f);
} }
const int xc[4] = {pix, ix, nix, nnix}; const int xc[4] = {pix, ix, nix, nnix};

View File

@@ -52,7 +52,6 @@
class MT_Vector3 : public MT_Tuple3 { class MT_Vector3 : public MT_Tuple3 {
public: public:
virtual ~MT_Vector3() {}
MT_Vector3() {} MT_Vector3() {}
MT_Vector3(const float *v) : MT_Tuple3(v) {} MT_Vector3(const float *v) : MT_Tuple3(v) {}
MT_Vector3(const double *v) : MT_Tuple3(v) {} MT_Vector3(const double *v) : MT_Tuple3(v) {}

View File

@@ -53,7 +53,6 @@
class MT_Vector4 : public MT_Tuple4 { class MT_Vector4 : public MT_Tuple4 {
public: public:
virtual ~MT_Vector4() {}
MT_Vector4() {} MT_Vector4() {}
MT_Vector4(const float *v) : MT_Tuple4(v) {} MT_Vector4(const float *v) : MT_Tuple4(v) {}
MT_Vector4(const double *v) : MT_Tuple4(v) {} MT_Vector4(const double *v) : MT_Tuple4(v) {}

View File

@@ -1146,7 +1146,7 @@ void ED_screen_draw(wmWindow *win)
/* blended join arrow */ /* blended join arrow */
if (sa1 && sa2) { if (sa1 && sa2) {
int dir = area_getorientation(sa1, sa2); int dir = area_getorientation(sa1, sa2);
int dira; int dira = -1;
if (dir != -1) { if (dir != -1) {
switch (dir) { switch (dir) {
case 0: /* W */ case 0: /* W */