Browse Source

silence compiler warning

Wei Mingzhi 6 years ago
parent
commit
e937251d82
1 changed files with 9 additions and 7 deletions
  1. 9 7
      font.c

+ 9 - 7
font.c

@@ -36,19 +36,13 @@ static int _font_height = 16;
 
 static uint8_t reverseBits(uint8_t x) {
     uint8_t y = 0;
-    for(int i = 0 ; i < 8; i++){
+    for (int i = 0 ; i < 8; i++){
         y <<= 1;
         y |= (x & 1);
         x >>= 1;
     }
     return y;
 }
-static uint16_t reverseBits16(uint16_t x) {
-   //specified to unifont structure; not common means
-   uint8_t l=reverseBits(x);
-   uint8_t h=reverseBits(x>>8);
-   return h<<8|l;
-}
 
 #ifdef DEBUG
 void dump_font(BYTE *buf,int rows, int cols)
@@ -64,6 +58,14 @@ void dump_font(BYTE *buf,int rows, int cols)
    }
 }
 
+static uint16_t reverseBits16(uint16_t x)
+{
+   //specified to unifont structure; not common means
+   uint8_t l = reverseBits(x);
+   uint8_t h = reverseBits(x >> 8);
+   return h << 8 | l;
+}
+
 void dump_font16(WORD *buf,int rows, int cols)
 {
    for(int row=0;row<rows;row++)