Browse Source

suppress bogus static analysis warning

Sean Barrett 10 years ago
parent
commit
16fc63404d
1 changed files with 3 additions and 0 deletions
  1. 3 0
      stb_truetype.h

+ 3 - 0
stb_truetype.h

@@ -43,6 +43,7 @@
 //       Giumo X. Clanjor
 //       Giumo X. Clanjor
 //       Higor Euripedes
 //       Higor Euripedes
 //       Thomas Fields
 //       Thomas Fields
+//       Derek Vinyard
 //
 //
 //   Misc other:
 //   Misc other:
 //       Ryan Gordon
 //       Ryan Gordon
@@ -2714,6 +2715,7 @@ static void stbtt__h_prefilter(unsigned char *pixels, int w, int h, int stride_i
    unsigned char buffer[STBTT_MAX_OVERSAMPLE];
    unsigned char buffer[STBTT_MAX_OVERSAMPLE];
    int safe_w = w - kernel_width;
    int safe_w = w - kernel_width;
    int j;
    int j;
+   STBTT_memset(buffer, 0, STBTT_MAX_OVERSAMPLE); // suppress bogus warning from VS2013 -analyze
    for (j=0; j < h; ++j) {
    for (j=0; j < h; ++j) {
       int i;
       int i;
       unsigned int total;
       unsigned int total;
@@ -2775,6 +2777,7 @@ static void stbtt__v_prefilter(unsigned char *pixels, int w, int h, int stride_i
    unsigned char buffer[STBTT_MAX_OVERSAMPLE];
    unsigned char buffer[STBTT_MAX_OVERSAMPLE];
    int safe_h = h - kernel_width;
    int safe_h = h - kernel_width;
    int j;
    int j;
+   STBTT_memset(buffer, 0, STBTT_MAX_OVERSAMPLE); // suppress bogus warning from VS2013 -analyze
    for (j=0; j < w; ++j) {
    for (j=0; j < w; ++j) {
       int i;
       int i;
       unsigned int total;
       unsigned int total;