diff -Nurb gcin-1.6.5.pre4.orig/modules/anthy.cpp gcin-1.6.5.pre4/modules/anthy.cpp
--- gcin-1.6.5.pre4.orig/modules/anthy.cpp	2011-08-28 21:12:39.000000000 -0400
+++ gcin-1.6.5.pre4/modules/anthy.cpp	2011-08-29 22:26:29.000000000 -0400
@@ -1362,7 +1362,6 @@
 
     keys[keysN]=0;
 
-    int idx;
     for(i=0;i < jpN; i++) {
       char *s=idx_hira_kata(jp[i], FALSE);
 
@@ -1397,7 +1396,6 @@
   if (segN || jpN)
     *comp_flag|=4;
 
-ret:
   return attrN;
 }
 
diff -Nurb gcin-1.6.5.pre4.orig/modules/chewing-conf.cpp gcin-1.6.5.pre4/modules/chewing-conf.cpp
--- gcin-1.6.5.pre4.orig/modules/chewing-conf.cpp	2011-08-28 21:12:39.000000000 -0400
+++ gcin-1.6.5.pre4/modules/chewing-conf.cpp	2011-08-28 23:15:02.000000000 -0400
@@ -129,14 +129,14 @@
     char *pszHome;
     char *pszGcinKBConfig;
     char szBuf[32];
-    char szKbType[8];
+    char szKbType[16];
     char szKbSelKey[16];
     int  nFd;
     int  nRead;
     int  nIdx = 0;
 
     memset (szBuf, 0x00, 32);
-    memset (szKbType, 0x00, 8);
+    memset (szKbType, 0x00, 16);
     memset (szKbSelKey, 0x00, 16);
 
     pszHome = getenv ("HOME");
@@ -162,7 +162,7 @@
     
     sscanf (szBuf, "%s %s ", szKbType, szKbSelKey);
 
-    if (!szKbType || !szKbSelKey)
+    if (!strlen (szKbType) || !strlen (szKbSelKey))
         return;
 
     for (nIdx = 0; nIdx < strlen (szKbSelKey); nIdx++)
diff -Nurb gcin-1.6.5.pre4.orig/modules/chewing.cpp gcin-1.6.5.pre4/modules/chewing.cpp
--- gcin-1.6.5.pre4.orig/modules/chewing.cpp	2011-08-28 21:12:39.000000000 -0400
+++ gcin-1.6.5.pre4/modules/chewing.cpp	2011-08-29 22:24:37.000000000 -0400
@@ -1,5 +1,16 @@
 #include "chewing.h"
 
+// gcin-chewing funcs
+static gboolean select_idx (int c);
+static void prev_page (void);
+static void next_page (void);
+static gboolean chewing_initialize (void);
+static gboolean is_empty (void);
+static gboolean gcin_label_show (char *pszPho, int nPos);
+static gboolean gcin_label_clear (int nCount);
+static gboolean gcin_label_cand_show (char *pszWord, int nCount);
+static gboolean gtk_pango_font_pixel_size_get (int *pnFontWidth, int *pnFontHeight);
+
 static GCIN_module_main_functions g_gcinModMainFuncs;
 static GtkWidget *g_pWinChewing      = NULL;
 static ChewingContext *g_pChewingCtx = NULL;
@@ -7,7 +18,6 @@
 static GtkWidget *g_pHBoxChewing     = NULL;
 static SEG *g_pSeg = NULL;
 static int g_nCurrentCursorPos = 0;
-static int g_nFd;
 
 // FIXME: impl
 static gboolean
@@ -64,7 +74,6 @@
     PangoLayout *pPangoLayout;
     PangoContext *pPangoContext;
     PangoFontDescription *pPangoFontDesc;
-    int nFontWidth, nFontHeight;
 
     pPangoLayout = gtk_widget_create_pango_layout (g_pWinChewing, "中");
     //pPangoLayout = gtk_widget_create_pango_layout (
@@ -150,7 +159,6 @@
     return TRUE;
 }
 
-// FIXME: impl
 static gboolean
 is_empty (void)
 {
@@ -319,14 +327,11 @@
     int nZuinLen         = 0;
     char szWord[4];
     int nPhoIdx, nBufIdx;
-    int nShiftModifier;
-    int nTotalCandNum, nIdx;
+    int nIdx;
 
     if (!g_pChewingCtx)
         return FALSE;
 
-    nShiftModifier = (nKeyState & ShiftMask) > 0;
-
     memset (szWord, 0x00, 4);
 
     if (!g_gcinModMainFuncs.mf_tsin_pho_mode ())
@@ -429,7 +434,7 @@
 
         if (chewing_cand_TotalChoice (g_pChewingCtx))
         {
-            nTotalCandNum = nIdx = 0;
+            nIdx = 0;
             while (chewing_cand_hasNext (g_pChewingCtx))
             {
                 pszChewingCand = chewing_cand_String (g_pChewingCtx);
@@ -533,6 +538,9 @@
     if (g_gcinModMainFuncs.mf_gcin_edit_display_ap_only ())
         return;
 
+    if (is_empty ())
+        return;
+
     gtk_window_resize (GTK_WINDOW (g_pWinChewing),
                        32 * (chewing_buffer_Check (g_pChewingCtx) + 1),
                        12);
diff -Nurb gcin-1.6.5.pre4.orig/modules/chewing.h gcin-1.6.5.pre4/modules/chewing.h
--- gcin-1.6.5.pre4.orig/modules/chewing.h	2011-08-28 21:12:39.000000000 -0400
+++ gcin-1.6.5.pre4/modules/chewing.h	2011-08-28 23:15:02.000000000 -0400
@@ -45,17 +45,6 @@
 int module_win_visible (void);
 int module_flush_input (void);
 
-// gcin-chewing funcs
-static gboolean select_idx (int c);
-static void prev_page (void);
-static void next_page (void);
-static gboolean chewing_initialize (void);
-static gboolean is_empty (void);
-static gboolean gcin_label_show (char *pszPho, int nPos);
-static gboolean gcin_label_clear (int nCount);
-static gboolean gcin_label_cand_show (char *pszWord, int nCount);
-static gboolean gtk_pango_font_pixel_size_get (int *pnFontWidth, int *pnFontHeight);
-
 // config funcs
 void chewing_config_open (gboolean bWrite);
 void chewing_config_load (ChewingConfigData *pChewingConfig);
