diff --git a/xmrstak/backend/amd/amd_gpu/gpu.cpp b/xmrstak/backend/amd/amd_gpu/gpu.cpp
index 79afa00285ab569514439b12b4a0b9d53768b6cc..c45f211cde6bdccbf4f1fd239d6bb9ad23d50ce2 100644
--- a/xmrstak/backend/amd/amd_gpu/gpu.cpp
+++ b/xmrstak/backend/amd/amd_gpu/gpu.cpp
@@ -1053,7 +1053,7 @@ size_t XMRRunJob(GpuContext* ctx, cl_uint* HashOutput)
 	if(ctx->compMode)
 	{
 		// round up to next multiple of w_size
-		size_t g_thd = ((g_intensity + w_size - 1u) / w_size) * w_size;
+		g_thd = ((g_intensity + w_size - 1u) / w_size) * w_size;
 		// number of global threads must be a multiple of the work group size (w_size)
 		assert(g_thd%w_size == 0);
 	}