initial cppcheck fixes
This commit is contained in:
@@ -30,12 +30,12 @@
|
||||
//#define DEBUG_SEGMENTATION
|
||||
|
||||
int32_t nr_segmentation(unsigned char *input_buffer,
|
||||
unsigned char **output_buffers,
|
||||
unsigned int B,
|
||||
unsigned int *C,
|
||||
unsigned int *K,
|
||||
unsigned int *Zout, // [hna] Zout is Zc
|
||||
unsigned int *F)
|
||||
unsigned char **output_buffers,
|
||||
unsigned int B,
|
||||
unsigned int *C,
|
||||
unsigned int *K,
|
||||
unsigned int *Zout, // [hna] Zout is Zc
|
||||
unsigned int *F)
|
||||
{
|
||||
|
||||
unsigned int L,Bprime,Bprime_by_C,Z,r,Kb,k,s,crc,Kprime;
|
||||
@@ -53,12 +53,12 @@ int32_t nr_segmentation(unsigned char *input_buffer,
|
||||
|
||||
Bprime = B+((*C)*L);
|
||||
#ifdef DEBUG_SEGMENTATION
|
||||
printf("Bprime %d\n",Bprime);
|
||||
printf("Bprime %u\n",Bprime);
|
||||
#endif
|
||||
}
|
||||
|
||||
if ((*C)>MAX_NUM_DLSCH_SEGMENTS) {
|
||||
LOG_E(PHY,"nr_segmentation.c: too many segments %d, B %d, L %d, Bprime %d\n",*C,B,L,Bprime);
|
||||
LOG_E(PHY,"nr_segmentation.c: too many segments %d, B %d, L %d, Bprime %d\n",*C,B,L,Bprime);
|
||||
return(-1);
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ else
|
||||
Z = (Bprime_by_C/Kb);
|
||||
|
||||
#ifdef DEBUG_SEGMENTATION
|
||||
printf("nr segmetation B %d Bprime %d Bprime_by_C %d z %d \n", B, Bprime, Bprime_by_C, Z);
|
||||
printf("nr segmetation B %u Bprime %u Bprime_by_C %u z %u \n", B, Bprime, Bprime_by_C, Z);
|
||||
#endif
|
||||
|
||||
if (Z <= 2) {
|
||||
@@ -110,7 +110,7 @@ else
|
||||
*K = *K + 8;
|
||||
|
||||
#ifdef DEBUG_SEGMENTATION
|
||||
printf("Z_by_C %d , K2 %d\n",Z,*K);
|
||||
printf("Z_by_C %u , K2 %u\n",Z,*K);
|
||||
#endif
|
||||
} else if (Z <= 256) { // increase by 4 bytes til here
|
||||
*K = (Z>>4)<<4;
|
||||
@@ -134,8 +134,8 @@ else
|
||||
*F = ((*K) - Bprime_by_C);
|
||||
|
||||
#ifdef DEBUG_SEGMENTATION
|
||||
printf("final nr seg output Z %d K %d F %d \n", *Zout, *K, *F);
|
||||
printf("C %d, K %d, Bprime_bytes %d, Bprime %d, F %d\n",*C,*K,Bprime>>3,Bprime,*F);
|
||||
printf("final nr seg output Z %u K %u F %u \n", *Zout, *K, *F);
|
||||
printf("C %u, K %u, Bprime_bytes %u, Bprime %u, F %u\n",*C,*K,Bprime>>3,Bprime,*F);
|
||||
#endif
|
||||
|
||||
if ((input_buffer) && (output_buffers)) {
|
||||
|
||||
Reference in New Issue
Block a user