diff options
| author | nyamatongwe <unknown> | 2005-03-19 06:52:37 +0000 | 
|---|---|---|
| committer | nyamatongwe <unknown> | 2005-03-19 06:52:37 +0000 | 
| commit | 6007ca5bf84031f6e353d05907f195ef448769ca (patch) | |
| tree | fd9ab0c0fda9ee1269c62d6b667968ca063370f1 /src | |
| parent | 2a7a8b7e99b33159957d6b6ca9fbb7c77aab738c (diff) | |
| download | scintilla-mirror-6007ca5bf84031f6e353d05907f195ef448769ca.tar.gz | |
Initialise all SCNotification structs to {0} ensuring all fields are 0 or
NULL. Added options to make files so that this does trigger warnings.
Diffstat (limited to 'src')
| -rw-r--r-- | src/Editor.cxx | 32 | ||||
| -rw-r--r-- | src/ScintillaBase.cxx | 4 | 
2 files changed, 18 insertions, 18 deletions
| diff --git a/src/Editor.cxx b/src/Editor.cxx index cd4f63130..9211335df 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -3437,7 +3437,7 @@ void Editor::DelCharBack(bool allowLineStartDeletion) {  void Editor::NotifyFocus(bool) {}  void Editor::NotifyStyleToNeeded(int endStyleNeeded) { -	SCNotification scn; +	SCNotification scn = {0};  	scn.nmhdr.code = SCN_STYLENEEDED;  	scn.position = endStyleNeeded;  	NotifyParent(scn); @@ -3448,7 +3448,7 @@ void Editor::NotifyStyleNeeded(Document*, void *, int endStyleNeeded) {  }  void Editor::NotifyChar(int ch) { -	SCNotification scn; +	SCNotification scn = {0};  	scn.nmhdr.code = SCN_CHARADDED;  	scn.ch = ch;  	NotifyParent(scn); @@ -3461,7 +3461,7 @@ void Editor::NotifyChar(int ch) {  }  void Editor::NotifySavePoint(bool isSavePoint) { -	SCNotification scn; +	SCNotification scn = {0};  	if (isSavePoint) {  		scn.nmhdr.code = SCN_SAVEPOINTREACHED;  	} else { @@ -3471,19 +3471,19 @@ void Editor::NotifySavePoint(bool isSavePoint) {  }  void Editor::NotifyModifyAttempt() { -	SCNotification scn; +	SCNotification scn = {0};  	scn.nmhdr.code = SCN_MODIFYATTEMPTRO;  	NotifyParent(scn);  }  void Editor::NotifyDoubleClick(Point, bool) { -	SCNotification scn; +	SCNotification scn = {0};  	scn.nmhdr.code = SCN_DOUBLECLICK;  	NotifyParent(scn);  }  void Editor::NotifyHotSpotDoubleClicked(int position, bool shift, bool ctrl, bool alt) { -	SCNotification scn; +	SCNotification scn = {0};  	scn.nmhdr.code = SCN_HOTSPOTDOUBLECLICK;  	scn.position = position;  	scn.modifiers = (shift ? SCI_SHIFT : 0) | (ctrl ? SCI_CTRL : 0) | @@ -3492,7 +3492,7 @@ void Editor::NotifyHotSpotDoubleClicked(int position, bool shift, bool ctrl, boo  }  void Editor::NotifyHotSpotClicked(int position, bool shift, bool ctrl, bool alt) { -	SCNotification scn; +	SCNotification scn = {0};  	scn.nmhdr.code = SCN_HOTSPOTCLICK;  	scn.position = position;  	scn.modifiers = (shift ? SCI_SHIFT : 0) | (ctrl ? SCI_CTRL : 0) | @@ -3501,13 +3501,13 @@ void Editor::NotifyHotSpotClicked(int position, bool shift, bool ctrl, bool alt)  }  void Editor::NotifyUpdateUI() { -	SCNotification scn; +	SCNotification scn = {0};  	scn.nmhdr.code = SCN_UPDATEUI;  	NotifyParent(scn);  }  void Editor::NotifyPainted() { -	SCNotification scn; +	SCNotification scn = {0};  	scn.nmhdr.code = SCN_PAINTED;  	NotifyParent(scn);  } @@ -3521,7 +3521,7 @@ bool Editor::NotifyMarginClick(Point pt, bool shift, bool ctrl, bool alt) {  		x += vs.ms[margin].width;  	}  	if ((marginClicked >= 0) && vs.ms[marginClicked].sensitive) { -		SCNotification scn; +		SCNotification scn = {0};  		scn.nmhdr.code = SCN_MARGINCLICK;  		scn.modifiers = (shift ? SCI_SHIFT : 0) | (ctrl ? SCI_CTRL : 0) |  		                (alt ? SCI_ALT : 0); @@ -3535,7 +3535,7 @@ bool Editor::NotifyMarginClick(Point pt, bool shift, bool ctrl, bool alt) {  }  void Editor::NotifyNeedShown(int pos, int len) { -	SCNotification scn; +	SCNotification scn = {0};  	scn.nmhdr.code = SCN_NEEDSHOWN;  	scn.position = pos;  	scn.length = len; @@ -3543,7 +3543,7 @@ void Editor::NotifyNeedShown(int pos, int len) {  }  void Editor::NotifyDwelling(Point pt, bool state) { -	SCNotification scn; +	SCNotification scn = {0};  	scn.nmhdr.code = state ? SCN_DWELLSTART : SCN_DWELLEND;  	scn.position = PositionFromLocationClose(pt);  	scn.x = pt.x; @@ -3552,7 +3552,7 @@ void Editor::NotifyDwelling(Point pt, bool state) {  }  void Editor::NotifyZoom() { -	SCNotification scn; +	SCNotification scn = {0};  	scn.nmhdr.code = SCN_ZOOM;  	NotifyParent(scn);  } @@ -3564,7 +3564,7 @@ void Editor::NotifyModifyAttempt(Document*, void *) {  }  void Editor::NotifyMove(int position) { -	SCNotification scn; +	SCNotification scn = {0};  	scn.nmhdr.code = SCN_POSCHANGED;  	scn.position = position;  	NotifyParent(scn); @@ -3711,7 +3711,7 @@ void Editor::NotifyModified(Document*, DocModification mh, void *) {  			NotifyChange();	// Send EN_CHANGE  		} -		SCNotification scn; +		SCNotification scn = {0};  		scn.nmhdr.code = SCN_MODIFIED;  		scn.position = mh.position;  		scn.modificationType = mh.modificationType; @@ -3841,7 +3841,7 @@ void Editor::NotifyMacroRecord(unsigned int iMessage, unsigned long wParam, long  	}  	// Send notification -	SCNotification scn; +	SCNotification scn = {0};  	scn.nmhdr.code = SCN_MACRORECORD;  	scn.message = iMessage;  	scn.wParam = wParam; diff --git a/src/ScintillaBase.cxx b/src/ScintillaBase.cxx index 7735d35db..9526ab968 100644 --- a/src/ScintillaBase.cxx +++ b/src/ScintillaBase.cxx @@ -320,7 +320,7 @@ void ScintillaBase::AutoCompleteCompleted() {  	ac.Show(false);  	listSelected = selected; -	SCNotification scn; +	SCNotification scn = {0};  	scn.nmhdr.code = listType > 0 ? SCN_USERLISTSELECTION : SCN_AUTOCSELECTION;  	scn.message = 0;  	scn.wParam = listType; @@ -384,7 +384,7 @@ void ScintillaBase::CallTipShow(Point pt, const char *defn) {  }  void ScintillaBase::CallTipClick() { -	SCNotification scn; +	SCNotification scn = {0};  	scn.nmhdr.code = SCN_CALLTIPCLICK;  	scn.position = ct.clickPlace;  	NotifyParent(scn); | 
