diff options
author | drh <> | 2023-12-19 15:06:40 +0000 |
---|---|---|
committer | drh <> | 2023-12-19 15:06:40 +0000 |
commit | 4449a1b66ded7449aa9c82021a7e0fd5ba046153 (patch) | |
tree | e30ffc1ff73da9b5ccb611e8cf2b43c8cdae4400 /ext/misc/randomjson.c | |
parent | 611b9d3efd03c771811175f7a8d25bd7a3007ffd (diff) | |
download | sqlite-4449a1b66ded7449aa9c82021a7e0fd5ba046153.tar.gz sqlite-4449a1b66ded7449aa9c82021a7e0fd5ba046153.zip |
Fix harmless compiler warning in the randomjson.c extension.
FossilOrigin-Name: debe7060b16669ada7304ffb9bf7616c8fa30bd286d8be871ed17fd6d64a3d4c
Diffstat (limited to 'ext/misc/randomjson.c')
-rw-r--r-- | ext/misc/randomjson.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/ext/misc/randomjson.c b/ext/misc/randomjson.c index 5036fa604..cacc4feb6 100644 --- a/ext/misc/randomjson.c +++ b/ext/misc/randomjson.c @@ -157,27 +157,27 @@ static void jsonExpand( } n = strlen(z); if( (zX = strstr(z,"XX"))!=0 ){ - unsigned int r = prngInt(p); - if( (r&0xff)==((r>>8)&0xff) ) r += 0x100; - while( (r&0xff)==((r>>16)&0xff) || ((r>>8)&0xff)==((r>>16)&0xff) ){ - r += 0x10000; + unsigned int y = prngInt(p); + if( (y&0xff)==((y>>8)&0xff) ) y += 0x100; + while( (y&0xff)==((y>>16)&0xff) || ((y>>8)&0xff)==((y>>16)&0xff) ){ + y += 0x10000; } memcpy(zBuf, z, n+1); z = zBuf; zX = strstr(z,"XX"); while( zX!=0 ){ - zX[0] = "0123456789abcdef"[r%16]; r /= 16; - zX[1] = "0123456789abcdef"[r%16]; r /= 16; + zX[0] = "0123456789abcdef"[y%16]; y /= 16; + zX[1] = "0123456789abcdef"[y%16]; y /= 16; zX = strstr(zX, "XX"); } }else if( (zX = strstr(z,"DD"))!=0 ){ - unsigned int r = prngInt(p); + unsigned int y = prngInt(p); memcpy(zBuf, z, n+1); z = zBuf; zX = strstr(z,"DD"); while( zX!=0 ){ - zX[0] = "0123456789"[r%10]; r /= 10; - zX[1] = "0123456789"[r%10]; r /= 10; + zX[0] = "0123456789"[y%10]; y /= 10; + zX[1] = "0123456789"[y%10]; y /= 10; zX = strstr(zX, "DD"); } } |