From 6007ca5bf84031f6e353d05907f195ef448769ca Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Sat, 19 Mar 2005 06:52:37 +0000 Subject: Initialise all SCNotification structs to {0} ensuring all fields are 0 or NULL. Added options to make files so that this does trigger warnings. --- gtk/ScintillaGTK.cxx | 6 +++--- gtk/makefile | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'gtk') diff --git a/gtk/ScintillaGTK.cxx b/gtk/ScintillaGTK.cxx index a1cbffe10..17da56f97 100644 --- a/gtk/ScintillaGTK.cxx +++ b/gtk/ScintillaGTK.cxx @@ -889,7 +889,7 @@ sptr_t ScintillaGTK::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam return TargetAsUTF8(reinterpret_cast(lParam)); case SCI_ENCODEDFROMUTF8: - return EncodedFromUTF8(reinterpret_cast(wParam), + return EncodedFromUTF8(reinterpret_cast(wParam), reinterpret_cast(lParam)); default: @@ -1120,7 +1120,7 @@ void ScintillaGTK::NotifyParent(SCNotification scn) { } void ScintillaGTK::NotifyKey(int key, int modifiers) { - SCNotification scn; + SCNotification scn = {0}; scn.nmhdr.code = SCN_KEY; scn.ch = key; scn.modifiers = modifiers; @@ -1129,7 +1129,7 @@ void ScintillaGTK::NotifyKey(int key, int modifiers) { } void ScintillaGTK::NotifyURIDropped(const char *list) { - SCNotification scn; + SCNotification scn = {0}; scn.nmhdr.code = SCN_URIDROPPED; scn.text = list; diff --git a/gtk/makefile b/gtk/makefile index dc66a30e2..d9a6a65b6 100644 --- a/gtk/makefile +++ b/gtk/makefile @@ -23,7 +23,7 @@ vpath %.h ../src ../include vpath %.cxx ../src INCLUDEDIRS=-I ../include -I ../src -CXXBASEFLAGS=-W -Wall -Wno-char-subscripts -DGTK -DSCI_LEXER $(INCLUDEDIRS) +CXXBASEFLAGS=-Wall -Wno-missing-braces -Wno-char-subscripts -DGTK -DSCI_LEXER $(INCLUDEDIRS) ifdef NOTHREADS THREADFLAGS=-DG_THREADS_IMPL_NONE -- cgit v1.2.3