diff --git a/libcelt/bands.c b/libcelt/bands.c
index b63b31f4bbf5bd7b4a58cf96e2cefbeb45255117..349b72f6b0c4ee5b5943becfe51b9a6e522b73f7 100644
--- a/libcelt/bands.c
+++ b/libcelt/bands.c
@@ -1139,7 +1139,6 @@ static unsigned quant_band(int encode, const CELTMode *m, int i, celt_norm *X, c
             haar1(X, N0>>k, 1<<k);
          }
          B<<=recombine;
-         N_B>>=recombine;
 
          /* Scale output for later folding */
          if (lowband_out)
diff --git a/libcelt/celt.c b/libcelt/celt.c
index 8c30af9b1b3ae5aa1d080738c306c6fed2adde8d..2d79fe89bbdd89e68d3e6afd5c128d96432b182f 100644
--- a/libcelt/celt.c
+++ b/libcelt/celt.c
@@ -1009,7 +1009,6 @@ int celt_encode_with_ec_float(CELTEncoder * restrict st, const celt_sig * pcm, i
       VARDECL(celt_sig, _pre);
       celt_sig *pre[2];
       SAVE_STACK;
-      c = 0;
       ALLOC(_pre, CC*(N+COMBFILTER_MAXPERIOD), celt_sig);
 
       pre[0] = _pre;
diff --git a/libcelt/pitch.c b/libcelt/pitch.c
index 2356c9d3bbb398ce630ead346fd4d1b2997b6f19..5a035714b28edee91ff6d121ad9c2c1580e1e34a 100644
--- a/libcelt/pitch.c
+++ b/libcelt/pitch.c
@@ -250,7 +250,7 @@ static const int second_check[16] = {0, 0, 3, 2, 3, 2, 5, 2, 3, 2, 3, 2, 5, 2, 3
 celt_word16 remove_doubling(celt_word16 *x, int maxperiod, int minperiod,
       int N, int *_T0, int prev_period, celt_word16 prev_gain)
 {
-   int k, i, T, T0, k0;
+   int k, i, T, T0;
    celt_word16 g, g0;
    celt_word16 pg;
    celt_word32 xy,xx,yy;
@@ -291,7 +291,6 @@ celt_word16 remove_doubling(celt_word16 *x, int maxperiod, int minperiod,
 #else
       g = g0 = xy/sqrt(1+xx*yy);
 #endif
-   k0 = 1;
    /* Look for any pitch at T/k */
    for (k=2;k<=15;k++)
    {