b64.c icon indicating copy to clipboard operation
b64.c copied to clipboard

set bufc to (long) unsigned

Open kroko opened this issue 1 year ago • 0 comments

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

kroko avatar Jan 23 '24 11:01 kroko