diff --git a/lib/url.c b/lib/url.c
index fdc43789b13c7fae5aa953d90111a60def5c067e..215a1bbd3dedd518e52c9e433a8d2614ffa0524a 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -2004,6 +2004,8 @@ static void fix_hostname(struct connectdata *conn, struct hostname *host)
       host->name = host->encalloc;
     }
   }
+#else
+  (void)conn; /* never used */
 #endif
 }