diff --git a/libavcodec/nuv.c b/libavcodec/nuv.c
index 10dce6a5491cd23fcb5b9f006dfbe080273e35ae..bfbf79335b9b5a4d0c7180db95b7e00368d4072e 100644
--- a/libavcodec/nuv.c
+++ b/libavcodec/nuv.c
@@ -215,7 +215,6 @@ retry:
     }
     if (c->codec_frameheader) {
         int w, h, q;
-        int res;
         if (buf_size < RTJPEG_HEADER_SIZE) {
             av_log(avctx, AV_LOG_ERROR, "Too small NUV video frame\n");
             return AVERROR_INVALIDDATA;