remove compiler warnings

This commit is contained in:
Felix von Leitner 2014-03-14 00:25:09 +00:00
parent b571a40e68
commit de26fa9ec3
2 changed files with 4 additions and 4 deletions

View File

@ -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;
}
}

View File

@ -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;