jwerle / b64.c

Base64 encode/decode
MIT License
269 stars 103 forks source link

set bufc to (long) unsigned #32

Open kroko opened 8 months ago

kroko commented 8 months ago

currently

../b64/buffer.c:25:18: warning: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘int’ [-Wsign-compare]
   25 |         if (size > buf->bufc * B64_BUFFER_SIZE)
      |                  ^
../b64/buffer.c:27:29: warning: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘int’ [-Wsign-compare]
   27 |                 while (size > buf->bufc * B64_BUFFER_SIZE) buf->bufc++;

this PR sets bufc to unsigned