Declare all variables at the start of their scope.
diff --git a/Python/pythonrun.c b/Python/pythonrun.c
index 62dfd93..b82d77e 100644
--- a/Python/pythonrun.c
+++ b/Python/pythonrun.c
@@ -195,9 +195,9 @@
 	if (!Py_FileSystemDefaultEncoding) {
 		char *saved_locale = setlocale(LC_CTYPE, NULL);
 		char *codeset;
+		PyObject *enc = NULL;
 		setlocale(LC_CTYPE, "");
 		codeset = nl_langinfo(CODESET);
-		PyObject *enc = NULL;
 		if (*codeset) {
 			enc = PyCodec_Encoder(codeset);
 			if (enc) {