Fix misleading indentation

Fixes the following warning with clang:
```
1>../../vsimple.c(452,45): warning : misleading indentation; statement is not part of the previous 'if' [-Wmisleading-indentation]
```
This commit is contained in:
Pavel P
2022-03-09 17:13:21 +03:00
parent 1e8a6f1c1f
commit 9f58944566
5 changed files with 24 additions and 12 deletions

View File

@ -179,7 +179,8 @@ typedef unsigned char *(*BITPACK_D64)(uint64_t *__restrict out, unsigned n, cons
for(ip = in, in += n; ip < in;) { \
TEMPLATE3(uint, _usize_, _t) o,x;\
unsigned iplen = in - ip,b; \
if(iplen > _csize_) iplen = _csize_; PREFETCH(ip+512,0);\
if(iplen > _csize_) iplen = _csize_;\
PREFETCH(ip+512,0);\
o = TEMPLATE2(bit,_usize_)(ip, iplen, &x); b = TEMPLATE2(bsr,_usize_)(o);\
*op++ = b; op = TEMPLATE2(bitpacka, _usize_)[b](ip, iplen, op);\
ip += iplen;\

View File

@ -252,7 +252,8 @@ unsigned trlec(const unsigned char *__restrict in, unsigned inlen, unsigned char
TRLEPUT(pp, ip, m, rmap, op);
pp = ++ip;
}
if(ip < ie) PUTC(op, *ip++); AS(ip == ie, "Fatal ip>ie=%d ", (int)(ip-ie));
if(ip < ie) PUTC(op, *ip++);
AS(ip == ie, "Fatal ip>ie=%d ", (int)(ip-ie));
if(op - out < inlen)
return op - out; // RETURN length = rle

24
trled.c
View File

@ -355,14 +355,22 @@ unsigned TEMPLATE2(_srled, USIZE)(const unsigned char *__restrict in, unsigned c
op += r;
ip += (r+1)*sizeof(uint_t); PREFETCH(ip+512, 0);
#else
if(((c = ctout(ip)) == e)) goto a; ip += sizeof(uint_t); *op++ = c;
if(((c = ctout(ip)) == e)) goto a; ip += sizeof(uint_t); *op++ = c;
if(((c = ctout(ip)) == e)) goto a; ip += sizeof(uint_t); *op++ = c;
if(((c = ctout(ip)) == e)) goto a; ip += sizeof(uint_t); *op++ = c;
if(((c = ctout(ip)) == e)) goto a; ip += sizeof(uint_t); *op++ = c;
if(((c = ctout(ip)) == e)) goto a; ip += sizeof(uint_t); *op++ = c;
if(((c = ctout(ip)) == e)) goto a; ip += sizeof(uint_t); *op++ = c;
if(((c = ctout(ip)) == e)) goto a; ip += sizeof(uint_t); *op++ = c; PREFETCH(ip +512, 0);
if(((c = ctout(ip)) == e)) goto a;
ip += sizeof(uint_t); *op++ = c;
if(((c = ctout(ip)) == e)) goto a;
ip += sizeof(uint_t); *op++ = c;
if(((c = ctout(ip)) == e)) goto a;
ip += sizeof(uint_t); *op++ = c;
if(((c = ctout(ip)) == e)) goto a;
ip += sizeof(uint_t); *op++ = c;
if(((c = ctout(ip)) == e)) goto a;
ip += sizeof(uint_t); *op++ = c;
if(((c = ctout(ip)) == e)) goto a;
ip += sizeof(uint_t); *op++ = c;
if(((c = ctout(ip)) == e)) goto a;
ip += sizeof(uint_t); *op++ = c;
if(((c = ctout(ip)) == e)) goto a;
ip += sizeof(uint_t); *op++ = c; PREFETCH(ip +512, 0);
continue;
a: ip += sizeof(uint_t); PREFETCH(ip +512, 0);
#endif

3
vp4c.c
View File

@ -359,7 +359,8 @@ unsigned char *TEMPLATE2(_P4ENC, USIZE)(uint_t *__restrict in, unsigned n, unsig
#if HYBRID > 0 && USIZE >= 16
if(bx <= USIZE) {
#endif
for(i = 0; i < (n+63)/64; i++) ctou64(out+i*8) = xmap[i]; out += PAD8(n); //if(eqx == xn && bx) { out[-1] |=0x80; TEMPLATE2(ctou, USIZE)(out)=ax; out += (bx+7)/8; } else
for(i = 0; i < (n+63)/64; i++) ctou64(out+i*8) = xmap[i]; //if(eqx == xn && bx) { out[-1] |=0x80; TEMPLATE2(ctou, USIZE)(out)=ax; out += (bx+7)/8; } else
out += PAD8(n);
out = TEMPLATE2(bitpack, USIZE)(inx, xn, out, bx); //if(eq == n && b) { out[-1]|= 0x80; TEMPLATE2(ctou, USIZE)(out)=a; out += (b+7)/8; } else
out = TEMPLATE2(BITPACK, USIZE)(_in, n, out, b);
#if HYBRID > 0 && USIZE >= 16

View File

@ -449,7 +449,8 @@ unsigned char *TEMPLATE2(VSDEC, USIZE)(unsigned char *__restrict ip, size_t n, u
unsigned b = ((*ip++) >> 5)+1;
*op = *(unsigned long long *)ip;
if(unlikely(b!=8))
*op &= (1ull<<(b*8))-1; op++; ip += b;
*op &= (1ull<<(b*8))-1;
op++; ip += b;
break;
}
#endif