Scan build: Result of operation is garbage or undefined

This commit is contained in:
mir
2024-03-07 11:00:57 +01:00
parent b99e856733
commit fc8d0c59c6
27 changed files with 81 additions and 38 deletions
@@ -171,6 +171,7 @@ int LDPCencoder(unsigned char **inputArray, unsigned char **outputArray, encoder
{
fprintf(fd,"\n//row: %d\n",i1);
fprintf(fd2,"\n//row: %d\n",i1);
AssertFatal(shift > 0 , "The result of the right shift is undefined because the right operand is negative\n");
fprintf(fd," d2[%d]=",(Zc*i1)>>shift);
fprintf(fd2," d2[%d]=",(Zc*i1)>>(shift-1));