Clean up GCC warnings (2019-08-29 edition)

Updated most parts of the code that were throwing warnings in GCC.
This commit is contained in:
Bill Kendrick 2019-08-30 00:00:18 -07:00
parent 1f2c6c3c4e
commit 7938480174
16 changed files with 110 additions and 141 deletions

View file

@ -2,7 +2,7 @@
im.c
Input method handling
Copyright (c)2007 by Mark K. Kim and others
Copyright (c) 2007-2019 by Mark K. Kim and others
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -905,12 +905,12 @@ static int im_event_zh_tw(IM_DATA * im, SDL_keysym ks)
case IM_REQ_FREE: /* Free allocated resources */
charmap_free(&cm);
/* go onto full reset */
__attribute__ ((fallthrough)); /* go onto full reset */
case IM_REQ_RESET_FULL: /* Full reset */
cm.section = SEC_ENGLISH;
im->tip_text = im_tip_text[IM_TIP_ENGLISH];
/* go onto soft reset */
__attribute__ ((fallthrough)); /* go onto soft reset */
case IM_REQ_RESET_SOFT: /* Soft reset */
im->s[0] = L'\0';
@ -1124,12 +1124,12 @@ static int im_event_th(IM_DATA * im, SDL_keysym ks)
case IM_REQ_FREE: /* Free allocated resources */
charmap_free(&cm);
/* go onto full reset */
__attribute__ ((fallthrough)); /* go onto full reset */
case IM_REQ_RESET_FULL: /* Full reset */
cm.section = SEC_ENGLISH;
im->tip_text = im_tip_text[IM_TIP_ENGLISH];
/* go onto soft reset */
__attribute__ ((fallthrough)); /* go onto soft reset */
case IM_REQ_RESET_SOFT: /* Soft reset */
im->s[0] = L'\0';
@ -1343,12 +1343,12 @@ static int im_event_ja(IM_DATA * im, SDL_keysym ks)
case IM_REQ_FREE: /* Free allocated resources */
charmap_free(&cm);
/* go onto full reset */
__attribute__ ((fallthrough)); /* go onto full reset */
case IM_REQ_RESET_FULL: /* Full reset */
cm.section = SEC_ENGLISH;
im->tip_text = im_tip_text[IM_TIP_ENGLISH];
/* go onto soft reset */
__attribute__ ((fallthrough)); /* go onto soft reset */
case IM_REQ_RESET_SOFT: /* Soft reset */
im->s[0] = L'\0';
@ -1590,12 +1590,12 @@ static int im_event_ko(IM_DATA * im, SDL_keysym ks)
case IM_REQ_FREE: /* Free allocated resources */
charmap_free(&cm);
/* go onto full reset */
__attribute__ ((fallthrough)); /* go onto full reset */
case IM_REQ_RESET_FULL: /* Full reset */
cm.section = SEC_ENGLISH;
im->tip_text = im_tip_text[IM_TIP_ENGLISH];
/* go onto soft reset */
__attribute__ ((fallthrough)); /* go onto soft reset */
case IM_REQ_RESET_SOFT: /* Soft reset */
im->s[0] = L'\0';
@ -1681,7 +1681,7 @@ static int im_event_ko(IM_DATA * im, SDL_keysym ks)
im->redraw--;
ks.unicode = L'\0';
}
/* continue processing: */
__attribute__ ((fallthrough)); /* continue processing: */
/* Actual character processing */
default: