Skip to content

Commit

Permalink
format test case 85 14
Browse files Browse the repository at this point in the history
  • Loading branch information
FungOliver committed Feb 1, 2024
1 parent c6774e9 commit b51131f
Showing 1 changed file with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,19 @@ int readUntil(char *arr, int len)
{
for (int i = 0; i < len; i++)
{
int tmp = 2 *i;
int tmp = 2 * i;
if (top)
{
int j = i* 2;
int j = i * 2;
arr = j + arr;
arr = arr -i ;
arr = arr -i ;
arr = arr - i;
arr = arr - i;
// Without pointer tracking we would not be able to track the offset here.
char s = *(arr +tmp - i -i); // NOWARN
char s = *(arr + tmp - i - i); // NOWARN
}
char s = *arr; // NOWARN
char s = *(arr+1); // WARN
char s = *(arr-1); // WARN
char s = *arr; // NOWARN
char s = *(arr + 1); // WARN
char s = *(arr - 1); // WARN
arr = arr + 1;
}
}
Expand All @@ -30,5 +30,5 @@ int main()
else
len = 10;
char *ptr = malloc(len);
readUntil(ptr, len);
readUntil(ptr, len);
}

0 comments on commit b51131f

Please sign in to comment.