From b0957702a88e6547ecca252165cef4a653239fec Mon Sep 17 00:00:00 2001 From: Christian Beier Date: Sat, 28 Jul 2018 14:23:19 +0200 Subject: [PATCH] SDLvncviewer: adhere to C89 --- client_examples/SDLvncviewer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client_examples/SDLvncviewer.c b/client_examples/SDLvncviewer.c index 9c509b0..67820a8 100644 --- a/client_examples/SDLvncviewer.c +++ b/client_examples/SDLvncviewer.c @@ -181,7 +181,8 @@ static rfbKeySym utf8char2rfbKeySym(const char chr[4]) { int bytes = strlen(chr); int shift = utf8Mapping[0].bits_stored * (bytes - 1); rfbKeySym codep = (*chr++ & utf8Mapping[bytes].mask) << shift; - for(int i = 1; i < bytes; ++i, ++chr) { + int i; + for(i = 1; i < bytes; ++i, ++chr) { shift -= utf8Mapping[0].bits_stored; codep |= ((char)*chr & utf8Mapping[0].mask) << shift; }