diff --git a/libswresample/dither_template.c b/libswresample/dither_template.c
index 4af73127790c8efd3e90e37fc608d4480123f3ce..1e35dfb0401fdfee040b05a1c6e0b7c3f99278a5 100644
--- a/libswresample/dither_template.c
+++ b/libswresample/dither_template.c
@@ -2,12 +2,12 @@
 #if defined(TEMPLATE_DITHER_DBL)
 #    define RENAME(N) N ## _double
 #    define DELEM  double
-#    define CLIP(v)
+#    define CLIP(v) while(0)
 
 #elif defined(TEMPLATE_DITHER_FLT)
 #    define RENAME(N) N ## _float
 #    define DELEM  float
-#    define CLIP(v)
+#    define CLIP(v) while(0)
 
 #elif defined(TEMPLATE_DITHER_S32)
 #    define RENAME(N) N ## _int32