From 09529fe01863fe6b8f579d47a5287223344d6040 Mon Sep 17 00:00:00 2001 From: Hong Shin Date: Mon, 8 Apr 2024 14:48:32 -0700 Subject: [PATCH] Update reader.c to initialize i inside loop PiperOrigin-RevId: 622958098 --- upb/wire/reader.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/upb/wire/reader.c b/upb/wire/reader.c index 2af812bf58..ef1e6efa5f 100644 --- a/upb/wire/reader.c +++ b/upb/wire/reader.c @@ -20,8 +20,7 @@ UPB_NOINLINE UPB_PRIVATE(_upb_WireReader_LongVarint) UPB_PRIVATE(_upb_WireReader_ReadLongVarint)(const char* ptr, uint64_t val) { UPB_PRIVATE(_upb_WireReader_LongVarint) ret = {NULL, 0}; uint64_t byte; - int i; - for (i = 1; i < 10; i++) { + for (int i = 1; i < 10; i++) { byte = (uint8_t)ptr[i]; val += (byte - 1) << (i * 7); if (!(byte & 0x80)) {