Skip to content
Myr

fix comma warnings when building with -Wcomma

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by kroko · committed by kroko · parent 72990ef · Browse files · 1 file+9 added−8 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+9 added−8 removed

  • other:+9 added−8 removed

1 file+9 added−8 removed

modified:stb_image_write.h+9 added-8 removed
391 unmodified lines
392393static void stbiw__write3(stbi__write_context *s, unsigned char a, unsigned char b, unsigned char c)394{395 unsigned char arr[3];396 arr[0] = a, arr[1] = b, arr[2] = c;396 arr[0] = a; arr[1] = b; arr[2] = c;397 s->func(s->context, arr, 3);398}399400static void stbiw__write_pixel(stbi__write_context *s, int rgb_dir, int comp, int write_alpha, int expand_mono, unsigned char *d)
39 unmodified lines
440441 if (stbi__flip_vertically_on_write)442 vdir *= -1;443444 if (vdir < 0)445 j_end = -1, j = y-1;446 else447 j_end = y, j = 0;444 if (vdir < 0) {445 j_end = -1; j = y-1;446 } else {447 j_end = y; j = 0;448 }449450 for (; j != j_end; j += vdir) {451 for (i=0; i < x; ++i) {452 unsigned char *d = (unsigned char *) data + (j*x+i)*comp;
442 unmodified lines
895 int n = stbiw__sbcount(hlist);896 for (j=0; j < n; ++j) {897 if (hlist[j]-data > i-32768) { // if entry lies within window898 int d = stbiw__zlib_countm(hlist[j], data+i, data_len-i);898 if (d >= best) best=d,bestloc=hlist[j];899 if (d >= best) { best=d; bestloc=hlist[j]; }900 }901 }902 // when hash table entry is too long, delete half the entries903 if (hash_table[h] && stbiw__sbn(hash_table[h]) == 2*quality) {
50 unmodified lines
954 unsigned int s1=1, s2=0;955 int blocklen = (int) (data_len % 5552);956 j=0;957 while (j < data_len) {957 for (i=0; i < blocklen; ++i) s1 += data[j+i], s2 += s1;958 s1 %= 65521, s2 %= 65521;958 for (i=0; i < blocklen; ++i) { s1 += data[j+i]; s2 += s1; }959 s1 %= 65521; s2 %= 65521;960 j += blocklen;961 blocklen = 5552;962 }963 stbiw__sbpush(out, STBIW_UCHAR(s2 >> 8));
659 unmodified lines