From 9503635a796050bbdcc8c19d8fbf84c844048693 Mon Sep 17 00:00:00 2001 From: Simon Sobisch Date: Sat, 4 Apr 2026 22:08:04 +0200 Subject: [PATCH] vt pdckbd (PDC_get_key): fix missing init warnings fixes #373 some of the variables are passed as pointers to sub-functions but may not always be set - explicit initialize to fix the init-warning this results in --- vt/pdckbd.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/vt/pdckbd.c b/vt/pdckbd.c index 6a188193..7ed1a9ce 100644 --- a/vt/pdckbd.c +++ b/vt/pdckbd.c @@ -307,16 +307,15 @@ int PDC_get_key( void) } if( check_key( &rval)) { - int c[MAX_COUNT], modifiers = 0; + int c[MAX_COUNT] = { 0 }, modifiers = 0; #ifdef USE_CONIO if( rval == 0 || rval == 224) { - int key2; - -#ifdef __DJGPP__ /* DJGPP returns kbhit() = 1 only once for */ - key2 = dmc_getch( ); /* escape sequences, not twice as other */ -#else /* compilers for MS-DOS do */ +#ifdef __DJGPP__ /* DJGPP returns kbhit() = 1 only once for */ + int key2 = dmc_getch( ); /* escape sequences, not twice as other */ +#else /* compilers for MS-DOS do */ + int key2 = 0; while( !check_key( &key2)) ; #endif