From 02ef45be75a3024df11365956e1cce6392d9103c Mon Sep 17 00:00:00 2001 From: erik Date: Mon, 29 Jan 2007 21:53:48 +0000 Subject: Each file in this commit has an issue where the initial value of a variable is assumed to be something but no initial value is given. This commit changes that by either assigning an initial value or removing the assumption on an initial value (usually the former). --- (limited to 'noncore/apps/tinykate') diff --git a/noncore/apps/tinykate/libkate/document/katehighlight.cpp b/noncore/apps/tinykate/libkate/document/katehighlight.cpp index 89024f7..ee6030f 100644 --- a/noncore/apps/tinykate/libkate/document/katehighlight.cpp +++ b/noncore/apps/tinykate/libkate/document/katehighlight.cpp @@ -1316,7 +1316,7 @@ int HlManager::wildcardFind(const QString &fileName) { int HlManager::makeAttribs(Highlight *highlight, Attribute *a, int maxAttribs) { ItemStyleList defaultStyleList; - ItemStyle *defaultStyle; + ItemStyle *defaultStyle = 0; ItemDataList itemDataList; ItemData *itemData; int nAttribs, z; @@ -1330,7 +1330,7 @@ int HlManager::makeAttribs(Highlight *highlight, Attribute *a, int maxAttribs) { highlight->getItemDataList(itemDataList); nAttribs = itemDataList.count(); for (z = 0; z < nAttribs; z++) { - odebug << "HlManager::makeAttribs: createing one attribute definition" << oendl; + odebug << "HlManager::makeAttribs: creating an attribute definition" << oendl; itemData = itemDataList.at(z); if (itemData->defStyle) { // default style @@ -1351,8 +1351,10 @@ int HlManager::makeAttribs(Highlight *highlight, Attribute *a, int maxAttribs) { for (; z < maxAttribs; z++) { a[z].col = black; a[z].selCol = black; - a[z].bold = defaultStyle->bold; - a[z].italic = defaultStyle->italic; + if (defaultStyle) { + a[z].bold = defaultStyle->bold; + a[z].italic = defaultStyle->italic; + } } return nAttribs; } -- cgit v0.9.0.2