Fix compiler warnings

Fix compiler warnings in gwin.c
ugfx_release_2.6
Andrew Hannam 2012-11-17 18:24:24 +10:00
parent bbb2d434c4
commit d1836d49fe
1 changed files with 3 additions and 3 deletions

View File

@ -113,7 +113,7 @@ void gwinDestroyWindow(GHandle gh) {
case GW_BUTTON: case GW_BUTTON:
if ((gh->flags & GBTN_FLG_ALLOCTXT)) { if ((gh->flags & GBTN_FLG_ALLOCTXT)) {
gh->flags &= ~GBTN_FLG_ALLOCTXT; // To be sure, to be sure gh->flags &= ~GBTN_FLG_ALLOCTXT; // To be sure, to be sure
chHeapFree(((GButtonObject *)gh)->txt); chHeapFree((void *)((GButtonObject *)gh)->txt);
} }
break; break;
#endif #endif
@ -124,7 +124,7 @@ void gwinDestroyWindow(GHandle gh) {
// Clean up the structure // Clean up the structure
if (gh->flags & GWIN_FLG_DYNAMIC) { if (gh->flags & GWIN_FLG_DYNAMIC) {
gh->flags = 0; // To be sure, to be sure gh->flags = 0; // To be sure, to be sure
chHeapFree(gh); chHeapFree((void *)gh);
} }
} }
@ -799,7 +799,7 @@ void gwinSetButtonText(GHandle gh, const char *txt, bool_t useAlloc) {
if ((gh->flags & GBTN_FLG_ALLOCTXT)) { if ((gh->flags & GBTN_FLG_ALLOCTXT)) {
gh->flags &= ~GBTN_FLG_ALLOCTXT; gh->flags &= ~GBTN_FLG_ALLOCTXT;
if (gbw->txt) { if (gbw->txt) {
chHeapFree(gbw->txt); chHeapFree((void *)gbw->txt);
gbw->txt = ""; gbw->txt = "";
} }
} }