Fix a compile warning with global-motion off

Change-Id: I8379e4055e9c2737f1ad310095d7a318e6e74b2f
diff --git a/av1/encoder/rdopt.c b/av1/encoder/rdopt.c
index 0c21cac..720a3df 100644
--- a/av1/encoder/rdopt.c
+++ b/av1/encoder/rdopt.c
@@ -5077,7 +5077,9 @@
     const MV_REFERENCE_FRAME ref_frames[2], const BLOCK_SIZE bsize, int block,
     int mi_row, int mi_col) {
   int_mv zeromv[2] = { {.as_int = 0 } };
+#if CONFIG_GLOBAL_MOTION
   int comp_pred_mode = ref_frames[1] > INTRA_FRAME;
+#endif
   (void)mi_row;
   (void)mi_col;
 #if CONFIG_GLOBAL_MOTION