Browse Source

remove compiler warnings

master
Felix von Leitner 7 years ago
parent
commit
de26fa9ec3
  1. 6
      fmt/fmt_asn1derlength.c
  2. 2
      fmt/fmt_asn1dertag.c

6
fmt/fmt_asn1derlength.c

@ -13,11 +13,11 @@ size_t fmt_asn1derlength(char* dest,unsigned long long l) {
if (!(l>>(i*8)))
break;
if (dest) {
int j=i;
*dest=0x80+i; ++dest;
size_t j=i;
*dest=(char)(0x80+i); ++dest;
while (j) {
--j;
*dest=((l>>(j*8))&0xff);
*dest=(char)((l>>(j*8))&0xff);
++dest;
}
}

2
fmt/fmt_asn1dertag.c

@ -8,7 +8,7 @@ size_t fmt_asn1dertag(char* dest,unsigned long long l) {
unsigned long long t;
for (t=l, n=1; t>0x7f; t>>=7) ++n;
for (i=0; i<n; ++i) {
if (dest) dest[n-i-1]=((i!=0)<<7) | (l&0x7f);
if (dest) dest[n-i-1]=(char)(((i!=0)<<7) | (char)(l&0x7f));
l>>=7;
}
return i;

Loading…
Cancel
Save