Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed some spelling mistakes

  • Loading branch information...
commit 46a11183a5471183d626cf9189b346ad4d2a15bc 1 parent f15539d
Goran Džaferi authored December 15, 2010

Showing 38 changed files with 106 additions and 105 deletions. Show diff stats Hide diff stats

  1. 1  AUTHORS
  2. 2  cli/cmdlineparser.h
  3. 4  gui/applicationlist.h
  4. 2  gui/checkstatistics.cpp
  5. 2  gui/checkthread.h
  6. 2  gui/filelist.h
  7. 2  gui/mainwindow.cpp
  8. 2  gui/resultsview.h
  9. 2  gui/threadhandler.h
  10. 4  gui/threadresult.h
  11. 6  gui/translationhandler.cpp
  12. 2  gui/xmlreport.cpp
  13. 4  htmlreport/README.txt
  14. 4  lib/checkbufferoverrun.cpp
  15. 2  lib/checkclass.cpp
  16. 4  lib/checkmemoryleak.cpp
  17. 8  lib/checknullpointer.cpp
  18. 6  lib/checkother.cpp
  19. 2  lib/checkunusedfunctions.cpp
  20. 2  lib/cppcheck.h
  21. 4  lib/errorlogger.h
  22. 20  lib/preprocessor.cpp
  23. 6  lib/preprocessor.h
  24. 6  lib/settings.h
  25. 6  lib/symboldatabase.cpp
  26. 42  lib/tokenize.cpp
  27. 8  lib/tokenize.h
  28. 2  man/cppcheck.1.xml
  29. 2  man/manual.docbook
  30. 4  readme.txt
  31. 2  readme_64-bit_Windows.txt
  32. 18  test/testclass.cpp
  33. 2  test/testcppcheck.cpp
  34. 6  test/testmathlib.cpp
  35. 2  test/testpreprocessor.cpp
  36. 8  test/testsimplifytokens.cpp
  37. 2  test/testsuite.h
  38. 8  test/testtokenize.cpp
1  AUTHORS
@@ -12,6 +12,7 @@ Nicolas Le Cam
12 12
 Reijo Tomperi
13 13
 Robert Reif
14 14
 Slava Semushin
  15
+vBm
15 16
 Vesa Pikki
16 17
 Zachary Blair
17 18
 
2  cli/cmdlineparser.h
@@ -41,7 +41,7 @@ class CmdLineParser
41 41
 public:
42 42
     /**
43 43
      * The constructor.
44  
-     * @param settings Settings instance that will be modified accoding to
  44
+     * @param settings Settings instance that will be modified according to
45 45
      * options user has given.
46 46
      */
47 47
     CmdLineParser(Settings *settings);
4  gui/applicationlist.h
@@ -40,7 +40,7 @@
40 40
 * (message) - Error message
41 41
 * (severity) - Error severity
42 42
 *
43  
-* Example opening a file with Kate and make Kate scroll to the corret line:
  43
+* Example opening a file with Kate and make Kate scroll to the correct line:
44 44
 * kate -l(line) (file)
45 45
 *
46 46
 */
@@ -91,7 +91,7 @@ class ApplicationList : public QObject
91 91
     int GetApplicationCount() const;
92 92
 
93 93
     /**
94  
-    * @brief Get spesific application's name
  94
+    * @brief Get specific application's name
95 95
     *
96 96
     * @param index Index of the application whose name to get
97 97
     * @return Name of the application
2  gui/checkstatistics.cpp
@@ -83,7 +83,7 @@ unsigned CheckStatistics::GetCount(ShowTypes type) const
83 83
         break;
84 84
     case SHOW_NONE:
85 85
     default:
86  
-        qDebug() << "Unknown error type - returning zero statistices.";
  86
+        qDebug() << "Unknown error type - returning zero statistics.";
87 87
         break;
88 88
     }
89 89
     return count;
2  gui/checkthread.h
@@ -71,7 +71,7 @@ class CheckThread : public QThread
71 71
     * Whole purpose of these states is to allow stopping of the checking. When
72 72
     * stopping we say for the thread (Stopping) that stop when current check
73 73
     * has been completed. Thread must be stopped cleanly, just terminating thread
74  
-    * likely causes unpredictable side-effedts.
  74
+    * likely causes unpredictable side-effects.
75 75
     */
76 76
     enum State
77 77
     {
2  gui/filelist.h
@@ -70,7 +70,7 @@ class FileList
70 70
 
71 71
     /**
72 72
     * @brief Test if filename matches the filename extensions filtering.
73  
-    * @param true if filename matches filterin.
  73
+    * @param true if filename matches filtering.
74 74
     */
75 75
     bool FilterMatches(const QFileInfo &inf);
76 76
 
2  gui/mainwindow.cpp
@@ -315,7 +315,7 @@ void MainWindow::CheckDirectory()
315 315
 
316 316
 bool MainWindow::GetCheckProject()
317 317
 {
318  
-    // We have succesfully loaded project earlier and use that project
  318
+    // We have successfully loaded project earlier and use that project
319 319
     if (mProject)
320 320
         return true;
321 321
 
2  gui/resultsview.h
@@ -212,7 +212,7 @@ public slots:
212 212
     bool mErrorsFound;
213 213
 
214 214
     /**
215  
-    * @brief Should we show a "No errors found dialog" everytime no errors were found?
  215
+    * @brief Should we show a "No errors found dialog" every time no errors were found?
216 216
     */
217 217
     bool mShowNoErrorsMessage;
218 218
 
2  gui/threadhandler.h
@@ -86,7 +86,7 @@ class ThreadHandler : public QObject
86 86
     * @brief Start the threads to check the files
87 87
     *
88 88
     * @param settings Settings for checking
89  
-    * @param recheck Should we reuse the files we checked earleir
  89
+    * @param recheck Should we reuse the files we checked earlier
90 90
     */
91 91
     void Check(const Settings &settings, bool recheck);
92 92
 
4  gui/threadresult.h
@@ -75,8 +75,8 @@ class ThreadResult : public QObject, public ErrorLogger
75 75
 public slots:
76 76
 
77 77
     /**
78  
-    * @brief Slot threads use to signal this class that a spesific file is checked
79  
-    * @param file File taht is checked
  78
+    * @brief Slot threads use to signal this class that a specific file is checked
  79
+    * @param file File that is checked
80 80
     */
81 81
     void FileChecked(const QString &file);
82 82
 signals:
6  gui/translationhandler.cpp
@@ -49,7 +49,7 @@ TranslationHandler::TranslationHandler(QObject *parent) :
49 49
             << "cppcheck_ja"
50 50
             << "cppcheck_sr";
51 51
 
52  
-    //Load english as a fallback language
  52
+    //Load English as a fallback language
53 53
     QTranslator *english = new QTranslator();
54 54
     if (english->load("cppcheck_en"))
55 55
     {
@@ -78,7 +78,7 @@ const QStringList TranslationHandler::GetFiles() const
78 78
 
79 79
 bool TranslationHandler::SetLanguage(const int index, QString &error)
80 80
 {
81  
-    //If english is the language
  81
+    //If English is the language
82 82
     if (index == 0)
83 83
     {
84 84
         //Just remove all extra translators
@@ -147,7 +147,7 @@ int TranslationHandler::SuggestLanguage() const
147 147
     //And see if we can find it from our list of language files
148 148
     int index = mFiles.indexOf(file);
149 149
 
150  
-    //If nothing found, return english
  150
+    //If nothing found, return English
151 151
     if (index < 0)
152 152
     {
153 153
         return 0;
2  gui/xmlreport.cpp
@@ -89,7 +89,7 @@ void XmlReport::WriteError(const ErrorItem &error)
89 89
     /*
90 90
     Error example from the core program in xml
91 91
     <error file="gui/test.cpp" line="14" id="mismatchAllocDealloc" severity="error" msg="Mismatching allocation and deallocation: k"/>
92  
-    The callstack seems to be ignored here aswell, instead last item of the stack is used
  92
+    The callstack seems to be ignored here as well, instead last item of the stack is used
93 93
     */
94 94
 
95 95
     mXmlWriter->writeStartElement(ErrorElementName);
4  htmlreport/README.txt
... ...
@@ -1,7 +1,7 @@
1 1
 cppcheck-htmlreport
2 2
 
3  
-This is a little utility to generate a html report of a xml file produced by
  3
+This is a little utility to generate a html report of a XML file produced by
4 4
 cppcheck.
5 5
 
6  
-The utility is implemented in python and require the pygments module to be
  6
+The utility is implemented in Python and require the pygments module to be
7 7
 able to generate syntax highlighted source code.
4  lib/checkbufferoverrun.cpp
@@ -753,7 +753,7 @@ void CheckBufferOverrun::checkScope(const Token *tok, const std::vector<std::str
753 753
             if (Token::Match(tok2->tokAt(4), "%var% =|+=|-=") && MathLib::toLongNumber(max_counter_value) <= size)
754 754
                 condition_out_of_bounds = false;
755 755
 
756  
-            // Goto the end paranthesis of the for-statement: "for (x; y; z)" ..
  756
+            // Goto the end parenthesis of the for-statement: "for (x; y; z)" ..
757 757
             tok2 = tok->next()->link();
758 758
             if (!tok2 || !tok2->tokAt(5))
759 759
                 break;
@@ -922,7 +922,7 @@ void CheckBufferOverrun::checkScope(const Token *tok, const ArrayInfo &arrayInfo
922 922
             if (Token::Match(tok2->tokAt(4), "%var% =|+=|-=") && MathLib::toLongNumber(max_counter_value) <= (int)arrayInfo.num[0])
923 923
                 condition_out_of_bounds = false;
924 924
 
925  
-            // Goto the end paranthesis of the for-statement: "for (x; y; z)" ..
  925
+            // Goto the end parenthesis of the for-statement: "for (x; y; z)" ..
926 926
             tok2 = tok->next()->link();
927 927
             if (!tok2 || !tok2->tokAt(5))
928 928
                 break;
2  lib/checkclass.cpp
@@ -211,7 +211,7 @@ void CheckClass::privateFunctions()
211 211
         if (!info->isClassOrStruct())
212 212
             continue;
213 213
 
214  
-        // dont check derived classes
  214
+        // dont check derived classes
215 215
         if (!info->derivedFrom.empty())
216 216
             continue;
217 217
 
4  lib/checkmemoryleak.cpp
@@ -1403,7 +1403,7 @@ Token *CheckMemoryLeakInFunction::getcode(const Token *tok, std::list<const Toke
1403 1403
 
1404 1404
             // Inside class function.. if the var is passed as a parameter then
1405 1405
             // just add a "::use"
1406  
-            // The "::use" means that a member function was probably called but it wasn't analyzed further
  1406
+            // The "::use" means that a member function was probably called but it wasn't analysed further
1407 1407
             else if (classmember)
1408 1408
             {
1409 1409
                 if (noreturn.find(tok->str()) != noreturn.end())
@@ -2225,7 +2225,7 @@ const Token *CheckMemoryLeakInFunction::findleak(const Token *tokens)
2225 2225
         while (last->next())
2226 2226
             last = last->next();
2227 2227
 
2228  
-        // not a leak if exit is called before the end of the funcion
  2228
+        // not a leak if exit is called before the end of the function
2229 2229
         if (!Token::Match(last->tokAt(-2), "exit|callfunc ; }"))
2230 2230
             return last;
2231 2231
     }
8  lib/checknullpointer.cpp
@@ -216,11 +216,11 @@ void CheckNullPointer::nullPointerLinkedList()
216 216
         if (!Token::simpleMatch(tok1->next()->link(), ") {"))
217 217
             continue;
218 218
 
219  
-        // is there any dereferencing occuring in the for statement..
  219
+        // is there any dereferencing occurring in the for statement..
220 220
         unsigned int parlevel2 = 1;
221 221
         for (const Token *tok2 = tok1->tokAt(2); tok2; tok2 = tok2->next())
222 222
         {
223  
-            // Parantheses..
  223
+            // Parentheses..
224 224
             if (tok2->str() == "(")
225 225
                 ++parlevel2;
226 226
             else if (tok2->str() == ")")
@@ -230,7 +230,7 @@ void CheckNullPointer::nullPointerLinkedList()
230 230
                 --parlevel2;
231 231
             }
232 232
 
233  
-            // Dereferencing a variable inside the "for" parantheses..
  233
+            // Dereferencing a variable inside the "for" parentheses..
234 234
             else if (Token::Match(tok2, "%var% . %var%"))
235 235
             {
236 236
                 const unsigned int varid(tok2->varId());
@@ -532,7 +532,7 @@ void CheckNullPointer::nullPointer()
532 532
     nullPointerByCheckAndDeRef();
533 533
 }
534 534
 
535  
-/** Derefencing null constant (simplified token list) */
  535
+/** Dereferencing null constant (simplified token list) */
536 536
 void CheckNullPointer::nullConstantDereference()
537 537
 {
538 538
     // this is kept at 0 for all scopes that are not executing
6  lib/checkother.cpp
@@ -1041,7 +1041,7 @@ static int doAssignment(Variables &variables, const Token *tok, bool dereference
1041 1041
                             if (scope == var1->_scope)
1042 1042
                                 replace = true;
1043 1043
 
1044  
-                            // not in same scope as decelaration
  1044
+                            // not in same scope as declaration
1045 1045
                             else
1046 1046
                             {
1047 1047
                                 std::set<Scope *>::iterator assignment;
@@ -1070,7 +1070,7 @@ static int doAssignment(Variables &variables, const Token *tok, bool dereference
1070 1070
                                 // assignment in this scope
1071 1071
                                 else
1072 1072
                                 {
1073  
-                                    // replace when only one other assingnment
  1073
+                                    // replace when only one other assignment
1074 1074
                                     if (var1->_assignments.size() == 1)
1075 1075
                                         replace = true;
1076 1076
 
@@ -1107,7 +1107,7 @@ static int doAssignment(Variables &variables, const Token *tok, bool dereference
1107 1107
             {
1108 1108
                 if (var1->_type == Variables::pointer && !dereference)
1109 1109
                 {
1110  
-                    // check if variable decelaration is in this scope
  1110
+                    // check if variable declaration is in this scope
1111 1111
                     if (var1->_scope == scope)
1112 1112
                         variables.clearAliases(varid1);
1113 1113
                     else
2  lib/checkunusedfunctions.cpp
@@ -115,7 +115,7 @@ void CheckUnusedFunctions::parseTokens(const Tokenizer &tokenizer)
115 115
         else
116 116
             continue;
117 117
 
118  
-        // funcname ( => Assert that the end paranthesis isn't followed by {
  118
+        // funcname ( => Assert that the end parenthesis isn't followed by {
119 119
         if (Token::Match(funcname, "%var% ("))
120 120
         {
121 121
             int parlevel = 0;
2  lib/cppcheck.h
@@ -116,7 +116,7 @@ class CppCheck : public ErrorLogger
116 116
 
117 117
     /**
118 118
      * @brief Call all "getErrorMessages" in all registered Check classes.
119  
-     * Also print out xml header and footer.
  119
+     * Also print out XML header and footer.
120 120
      */
121 121
     void getErrorMessages();
122 122
 
4  lib/errorlogger.h
@@ -128,7 +128,7 @@ class ErrorLogger
128 128
         /**
129 129
          * Format the error message in XML format
130 130
          * @param verbose use verbose message
131  
-         * @param ver xml version
  131
+         * @param ver XML version
132 132
          */
133 133
         std::string toXML(bool verbose, int ver) const;
134 134
 
@@ -170,7 +170,7 @@ class ErrorLogger
170 170
 
171 171
     private:
172 172
         /**
173  
-         * Replace all occurances of searchFor with replaceWith in the
  173
+         * Replace all occurrences of searchFor with replaceWith in the
174 174
          * given source.
175 175
          * @param source The string to modify
176 176
          * @param searchFor What should be searched for
20  lib/preprocessor.cpp
@@ -225,7 +225,7 @@ std::string Preprocessor::removeComments(const std::string &str, const std::stri
225 225
         {
226 226
             std::ostringstream errmsg;
227 227
             errmsg << "The code contains characters that are unhandled. "
228  
-                   << "Neither unicode nor extended ascii are supported. "
  228
+                   << "Neither unicode nor extended ASCII are supported. "
229 229
                    << "(line=" << lineno << ", character code=" << std::hex << (int(ch) & 0xff) << ")";
230 230
             writeError(filename, lineno, _errorLogger, "syntaxError", errmsg.str());
231 231
         }
@@ -1546,7 +1546,7 @@ void Preprocessor::handleIncludes(std::string &code,
1546 1546
                 (headerType == SystemHeader && systemIncludes.find(tempFile) != systemIncludes.end()))
1547 1547
             {
1548 1548
                 // We have processed this file already once, skip
1549  
-                // it this time to avoid ethernal loop.
  1549
+                // it this time to avoid eternal loop.
1550 1550
                 fin.close();
1551 1551
                 continue;
1552 1552
             }
@@ -1645,7 +1645,7 @@ static void skipstring(const std::string &line, std::string::size_type &pos)
1645 1645
  * @param pos  in: Position to the '('. out: Position to the ')'
1646 1646
  * @param params out: The extracted parameters
1647 1647
  * @param numberOfNewlines out: number of newlines in the macro call
1648  
- * @param endFound out: was the end paranthesis found?
  1648
+ * @param endFound out: was the end parenthesis found?
1649 1649
  */
1650 1650
 static void getparams(const std::string &line,
1651 1651
                       std::string::size_type &pos,
@@ -1663,7 +1663,7 @@ static void getparams(const std::string &line,
1663 1663
     if (line[pos] != '(')
1664 1664
         return;
1665 1665
 
1666  
-    // parantheses level
  1666
+    // parentheses level
1667 1667
     int parlevel = 0;
1668 1668
 
1669 1669
     // current parameter data
@@ -1672,7 +1672,7 @@ static void getparams(const std::string &line,
1672 1672
     // scan for parameters..
1673 1673
     for (; pos < line.length(); ++pos)
1674 1674
     {
1675  
-        // increase paranthesis level
  1675
+        // increase parenthesis level
1676 1676
         if (line[pos] == '(')
1677 1677
         {
1678 1678
             ++parlevel;
@@ -1680,7 +1680,7 @@ static void getparams(const std::string &line,
1680 1680
                 continue;
1681 1681
         }
1682 1682
 
1683  
-        // decrease paranthesis level
  1683
+        // decrease parenthesis level
1684 1684
         else if (line[pos] == ')')
1685 1685
         {
1686 1686
             --parlevel;
@@ -1759,7 +1759,7 @@ class PreprocessorMacro
1759 1759
     /** prefix that is used by cppcheck to separate macro parameters. Always "__cppcheck__" */
1760 1760
     const std::string _prefix;
1761 1761
 
1762  
-    /** The macro has parantheses but no parameters.. "AAA()" */
  1762
+    /** The macro has parentheses but no parameters.. "AAA()" */
1763 1763
     bool _nopar;
1764 1764
 
1765 1765
     /** disabled assignment operator */
@@ -1892,7 +1892,7 @@ class PreprocessorMacro
1892 1892
         return _variadic;
1893 1893
     }
1894 1894
 
1895  
-    /** Check if this macro has parantheses but no parameters */
  1895
+    /** Check if this macro has parentheses but no parameters */
1896 1896
     bool nopar() const
1897 1897
     {
1898 1898
         return _nopar;
@@ -2301,10 +2301,10 @@ std::string Preprocessor::expandMacros(const std::string &code, std::string file
2301 2301
                     // number of newlines within macro use
2302 2302
                     unsigned int numberOfNewlines = 0;
2303 2303
 
2304  
-                    // if the macro has parantheses, get parameters
  2304
+                    // if the macro has parentheses, get parameters
2305 2305
                     if (macro->variadic() || macro->nopar() || macro->params().size())
2306 2306
                     {
2307  
-                        // is the end paranthesis found?
  2307
+                        // is the end parenthesis found?
2308 2308
                         bool endFound = false;
2309 2309
 
2310 2310
                         getparams(line,pos2,params,numberOfNewlines,endFound);
6  lib/preprocessor.h
@@ -74,7 +74,7 @@ class Preprocessor
74 74
      * @param srcCodeStream The (file/string) stream to read from.
75 75
      * @param processedFile Give reference to empty string as a parameter,
76 76
      * function will fill processed file here. Use this also as a filedata parameter
77  
-     * to getcode() if you recieved more than once configurations.
  77
+     * to getcode() if you received more than once configurations.
78 78
      * @param resultConfigurations List of configurations. Pass these one by one
79 79
      * to getcode() with processedFile.
80 80
      * @param filename The name of the file to check e.g. "src/main.cpp"
@@ -147,9 +147,9 @@ class Preprocessor
147 147
     std::string removeComments(const std::string &str, const std::string &filename, Settings *settings);
148 148
 
149 149
     /**
150  
-     * Remove redundant parantheses from preprocessor commands. This should only be called from read().
  150
+     * Remove redundant parentheses from preprocessor commands. This should only be called from read().
151 151
      * @param str Code processed by read().
152  
-     * @return code with reduced parantheses
  152
+     * @return code with reduced parentheses
153 153
      */
154 154
     static std::string removeParantheses(const std::string &str);
155 155
 
6  lib/settings.h
@@ -84,10 +84,10 @@ class Settings
84 84
     /** @brief Force checking the files with "too many" configurations (--force). */
85 85
     bool _force;
86 86
 
87  
-    /** @brief write xml results (--xml) */
  87
+    /** @brief write XML results (--xml) */
88 88
     bool _xml;
89 89
 
90  
-    /** @brief xml version (--xmlver=..) */
  90
+    /** @brief XML version (--xmlver=..) */
91 91
     int _xml_version;
92 92
 
93 93
     /** @brief How many processes/threads should do checking at the same
@@ -174,7 +174,7 @@ class Settings
174 174
     /** @brief defines given by the user */
175 175
     std::string userDefines;
176 176
 
177  
-    /** @brief Experimentat 2 pass checking of files */
  177
+    /** @brief Experimental 2 pass checking of files */
178 178
     bool test_2_pass;
179 179
 
180 180
     /** @brief --report-progress */
6  lib/symboldatabase.cpp
@@ -388,7 +388,7 @@ SymbolDatabase::SymbolDatabase(const Tokenizer *tokenizer, const Settings *setti
388 388
                     if (func->type == SymbolDatabase::Func::Constructor)
389 389
                     {
390 390
                         // check for no arguments: func ( )
391  
-                        /** @todo check for arguents with default values someday */
  391
+                        /** @todo check for arguments with default values someday */
392 392
                         if (func->argDef->next() == func->argDef->link())
393 393
                         {
394 394
                             hasDefaultConstructor = true;
@@ -397,7 +397,7 @@ SymbolDatabase::SymbolDatabase(const Tokenizer *tokenizer, const Settings *setti
397 397
                     }
398 398
                 }
399 399
 
400  
-                // User defined types with user defined defaut constructor doesn't need initialization.
  400
+                // User defined types with user defined default constructor doesn't need initialization.
401 401
                 // We assume the default constructor initializes everything.
402 402
                 // Another check will figure out if the constructor actually initializes everything.
403 403
                 if (hasDefaultConstructor)
@@ -960,7 +960,7 @@ void SymbolDatabase::SpaceInfo::getVarList()
960 960
         }
961 961
 
962 962
         // Borland C++: Skip all variables in the __published section.
963  
-        // These are automaticly initialized.
  963
+        // These are automatically initialized.
964 964
         else if (tok->str() == "__published:")
965 965
         {
966 966
             for (; tok; tok = tok->next())
42  lib/tokenize.cpp
@@ -250,12 +250,12 @@ void Tokenizer::createTokens(std::istream &code)
250 250
     std::string CurrentToken;
251 251
 
252 252
     // lineNumbers holds line numbers for files in fileIndexes
253  
-    // every time an include file is complitely parsed, last item in the vector
  253
+    // every time an include file is completely parsed, last item in the vector
254 254
     // is removed and lineno is set to point to that value.
255 255
     std::vector<unsigned int> lineNumbers;
256 256
 
257 257
     // fileIndexes holds index for _files vector about currently parsed files
258  
-    // every time an include file is complitely parsed, last item in the vector
  258
+    // every time an include file is completely parsed, last item in the vector
259 259
     // is removed and FileIndex is set to point to that value.
260 260
     std::vector<unsigned int> fileIndexes;
261 261
 
@@ -1190,13 +1190,13 @@ void Tokenizer::simplifyTypedef()
1190 1190
 
1191 1191
                 if (simplifyType)
1192 1192
                 {
1193  
-                    // There are 2 catagories of typedef substitutions:
  1193
+                    // There are 2 categories of typedef substitutions:
1194 1194
                     // 1. variable declarations that preserve the variable name like
1195 1195
                     //    global, local, and function parameters
1196 1196
                     // 2. not variable declarations that have no name like derived
1197 1197
                     //    classes, casts, operators, and template parameters
1198 1198
 
1199  
-                    // try to determine which catagory this substitution is
  1199
+                    // try to determine which category this substitution is
1200 1200
                     bool isDerived = false;
1201 1201
                     bool inCast = false;
1202 1202
                     bool inTemplate = false;
@@ -2172,7 +2172,7 @@ bool Tokenizer::tokenize(std::istream &code,
2172 2172
     // Remove __builtin_expect, likely and unlikely
2173 2173
     simplifyBuiltinExpect();
2174 2174
 
2175  
-    // colapse compound standard types into a single token
  2175
+    // collapse compound standard types into a single token
2176 2176
     // unsigned long long int => long _isUnsigned=true,_isLong=true
2177 2177
     simplifyStdType();
2178 2178
 
@@ -2204,7 +2204,7 @@ bool Tokenizer::tokenize(std::istream &code,
2204 2204
 
2205 2205
     simplifyVariableMultipleAssign();
2206 2206
 
2207  
-    // Remove redundant parantheses
  2207
+    // Remove redundant parentheses
2208 2208
     simplifyRedundantParanthesis();
2209 2209
 
2210 2210
     // Handle templates..
@@ -3329,7 +3329,7 @@ void Tokenizer::setVarId()
3329 3329
                     // Found a class function..
3330 3330
                     if (Token::Match(tok2, funcpattern.c_str()))
3331 3331
                     {
3332  
-                        // Goto the end paranthesis..
  3332
+                        // Goto the end parenthesis..
3333 3333
                         tok2 = tok2->tokAt(3)->link();
3334 3334
                         if (!tok2)
3335 3335
                             break;
@@ -4049,7 +4049,7 @@ bool Tokenizer::simplifyTokenList()
4049 4049
         modified |= simplifyCalculations();
4050 4050
     }
4051 4051
 
4052  
-    // Remove redundant parantheses in return..
  4052
+    // Remove redundant parentheses in return..
4053 4053
     for (Token *tok = _tokens; tok; tok = tok->next())
4054 4054
     {
4055 4055
         while (Token::simpleMatch(tok, "return ("))
@@ -5470,7 +5470,7 @@ void Tokenizer::simplifyIfAssign()
5470 5470
         if (isNot)
5471 5471
             tok->next()->deleteNext();
5472 5472
 
5473  
-        // Delete paranthesis.. and remember how many there are with
  5473
+        // Delete parenthesis.. and remember how many there are with
5474 5474
         // their links.
5475 5475
         std::stack<Token *> braces;
5476 5476
         while (tok->next()->str() == "(")
@@ -6423,7 +6423,7 @@ bool Tokenizer::simplifyRedundantParanthesis()
6423 6423
                tok->link()->previous() == tok->next()->link())
6424 6424
         {
6425 6425
             // We have "(( *something* ))", remove the inner
6426  
-            // paranthesis
  6426
+            // parenthesis
6427 6427
             tok->deleteNext();
6428 6428
             tok->link()->tokAt(-2)->deleteNext();
6429 6429
             ret = true;
@@ -6433,7 +6433,7 @@ bool Tokenizer::simplifyRedundantParanthesis()
6433 6433
                tok->link()->previous() == tok->tokAt(2)->link())
6434 6434
         {
6435 6435
             // We have "( func ( *something* ))", remove the outer
6436  
-            // paranthesis
  6436
+            // parenthesis
6437 6437
             tok->link()->deleteThis();
6438 6438
             tok->deleteThis();
6439 6439
             ret = true;
@@ -6442,7 +6442,7 @@ bool Tokenizer::simplifyRedundantParanthesis()
6442 6442
         while (Token::Match(tok->previous(), "[;{] ( delete %var% ) ;"))
6443 6443
         {
6444 6444
             // We have "( delete var )", remove the outer
6445  
-            // paranthesis
  6445
+            // parenthesis
6446 6446
             tok->tokAt(3)->deleteThis();
6447 6447
             tok->deleteThis();
6448 6448
             ret = true;
@@ -6451,7 +6451,7 @@ bool Tokenizer::simplifyRedundantParanthesis()
6451 6451
         while (Token::Match(tok->previous(), "[;{] ( delete [ ] %var% ) ;"))
6452 6452
         {
6453 6453
             // We have "( delete [] var )", remove the outer
6454  
-            // paranthesis
  6454
+            // parenthesis
6455 6455
             tok->tokAt(5)->deleteThis();
6456 6456
             tok->deleteThis();
6457 6457
             ret = true;
@@ -6469,7 +6469,7 @@ bool Tokenizer::simplifyRedundantParanthesis()
6469 6469
 
6470 6470
         if (Token::Match(tok->previous(), "[(!*;{}] ( %var% )") && tok->next()->varId() != 0)
6471 6471
         {
6472  
-            // We have "( var )", remove the paranthesis
  6472
+            // We have "( var )", remove the parenthesis
6473 6473
             tok->deleteThis();
6474 6474
             tok->deleteNext();
6475 6475
             ret = true;
@@ -6478,7 +6478,7 @@ bool Tokenizer::simplifyRedundantParanthesis()
6478 6478
 
6479 6479
         if (Token::Match(tok->previous(), "[(!] ( %var% . %var% )"))
6480 6480
         {
6481  
-            // We have "( var . var )", remove the paranthesis
  6481
+            // We have "( var . var )", remove the parenthesis
6482 6482
             tok->deleteThis();
6483 6483
             tok = tok->tokAt(2);
6484 6484
             tok->deleteNext();
@@ -6539,11 +6539,11 @@ bool Tokenizer::simplifyCalculations()
6539 6539
     bool ret = false;
6540 6540
     for (Token *tok = _tokens; tok; tok = tok->next())
6541 6541
     {
6542  
-        // Remove parantheses around variable..
6543  
-        // keep parantheses here: dynamic_cast<Fred *>(p);
6544  
-        // keep parantheses here: A operator * (int);
6545  
-        // keep parantheses here: operator new [] (size_t);
6546  
-        // keep parantheses here: Functor()(a ... )
  6542
+        // Remove parentheses around variable..
  6543
+        // keep parentheses here: dynamic_cast<Fred *>(p);
  6544
+        // keep parentheses here: A operator * (int);
  6545
+        // keep parentheses here: operator new [] (size_t);
  6546
+        // keep parentheses here: Functor()(a ... )
6547 6547
         if (Token::Match(tok->next(), "( %var% ) [;),+-*/><]]") &&
6548 6548
             !tok->isName() &&
6549 6549
             tok->str() != ">" &&
@@ -6601,7 +6601,7 @@ bool Tokenizer::simplifyCalculations()
6601 6601
                 ret = true;
6602 6602
             }
6603 6603
 
6604  
-            // Remove parantheses around number..
  6604
+            // Remove parentheses around number..
6605 6605
             if (Token::Match(tok->tokAt(-2), "%any% ( %num% )") && !tok->tokAt(-2)->isName())
6606 6606
             {
6607 6607
                 tok = tok->previous();
8  lib/tokenize.h
@@ -175,7 +175,7 @@ class Tokenizer
175 175
     Token * initVar(Token * tok);
176 176
 
177 177
     /**
178  
-     * Colapse compound standard types into a single token.
  178
+     * Collapse compound standard types into a single token.
179 179
      * unsigned long long int => long _isUnsigned=true,_isLong=true
180 180
      */
181 181
     void simplifyStdType();
@@ -201,7 +201,7 @@ class Tokenizer
201 201
     void simplifyIfAssign();
202 202
 
203 203
     /**
204  
-     * Simplify multiple assignmetns.
  204
+     * Simplify multiple assignments.
205 205
      * Example: "a = b = c = 0;" => "a = 0; b = 0; c = 0;"
206 206
      */
207 207
     void simplifyVariableMultipleAssign();
@@ -294,7 +294,7 @@ class Tokenizer
294 294
      */
295 295
     bool simplifyConditions();
296 296
 
297  
-    /** Remove reduntant code, e.g. if( false ) { int a; } should be
  297
+    /** Remove redundant code, e.g. if( false ) { int a; } should be
298 298
      * removed, because it is never executed.
299 299
      * @return true if something is modified
300 300
      *         false if nothing is done.
@@ -322,7 +322,7 @@ class Tokenizer
322 322
     void simplifyStructDecl();
323 323
 
324 324
     /**
325  
-     * Remove redundant paranthesis:
  325
+     * Remove redundant parenthesis:
326 326
      * - "((x))" => "(x)"
327 327
      * - "(function())" => "function()"
328 328
      * - "(delete x)" => "delete x"
2  man/cppcheck.1.xml
@@ -294,7 +294,7 @@ files, this is not needed.</para>
294 294
       <varlistentry>
295 295
         <term><option>--xml</option></term>
296 296
         <listitem>
297  
-          <para>Write results in xml to error stream</para>
  297
+          <para>Write results in XML to error stream</para>
298 298
         </listitem>
299 299
       </varlistentry>
300 300
     </variablelist>
2  man/manual.docbook
@@ -396,7 +396,7 @@ uninitvar</programlisting>
396 396
     some tweaking you can improve the checking.</para>
397 397
 
398 398
     <section>
399  
-      <title>User defined allocation/deallocation functions</title>
  399
+      <title>User-defined allocation/deallocation functions</title>
400 400
 
401 401
       <para><literal>Cppcheck</literal> understands many common allocation and
402 402
       deallocation functions. But not all.</para>
4  readme.txt
@@ -9,7 +9,7 @@ About
9 9
 
10 10
 Manual
11 11
 
12  
-    A manual is available online: 
  12
+    A manual is available online:
13 13
     http://cppcheck.sf.net/manual.pdf
14 14
 
15 15
 Compiling
@@ -26,7 +26,7 @@ Compiling
26 26
 
27 27
     qmake
28 28
     =====
29  
-        You can use the gui/gui.pro file to build the gui.
  29
+        You can use the gui/gui.pro file to build the GUI.
30 30
             cd gui
31 31
             qmake
32 32
             make
2  readme_64-bit_Windows.txt
@@ -18,7 +18,7 @@ tools, libraries or headers so you cannot compile 64-bit binaries without
18 18
 Windows SDK.
19 19
 
20 20
 To compile 64-bit binaries you need to start VS Express to 64-bit environment.
21  
-(by default VS Express starts to 32-bit enviroment). To do this, open Windows
  21
+(by default VS Express starts to 32-bit environment). To do this, open Windows
22 22
 SDK Command Prompt and switch to 64-bit environment with command:
23 23
 > setenv /x64 /debug
24 24
 
18  test/testclass.cpp
@@ -580,7 +580,7 @@ class TestClass : public TestFixture
580 580
             "}\n");
581 581
         ASSERT_EQUALS("", errout.str());
582 582
 
583  
-        // this test needs an assignment test but doesnt have it
  583
+        // this test needs an assignment test but doesnt have it
584 584
         checkOpertorEqToSelf(
585 585
             "class A\n"
586 586
             "{\n"
@@ -1816,7 +1816,7 @@ class TestClass : public TestFixture
1816 1816
                        "}\n");
1817 1817
         ASSERT_EQUALS("[test.cpp:11]: (warning) Member variable not initialized in the constructor 'Foo::mMember'\n", errout.str());
1818 1818
 
1819  
-        // constructor in seperate namespace
  1819
+        // constructor in separate namespace
1820 1820
         checkUninitVar("namespace Output\n"
1821 1821
                        "{\n"
1822 1822
                        "    class Foo\n"
@@ -1835,7 +1835,7 @@ class TestClass : public TestFixture
1835 1835
                        "}\n");
1836 1836
         ASSERT_EQUALS("[test.cpp:13]: (warning) Member variable not initialized in the constructor 'Foo::mMember'\n", errout.str());
1837 1837
 
1838  
-        // constructor in different seperate namespace
  1838
+        // constructor in different separate namespace
1839 1839
         checkUninitVar("namespace Output\n"
1840 1840
                        "{\n"
1841 1841
                        "    class Foo\n"
@@ -1854,7 +1854,7 @@ class TestClass : public TestFixture
1854 1854
                        "}\n");
1855 1855
         ASSERT_EQUALS("", errout.str());
1856 1856
 
1857  
-        // constructor in different seperate namespace (won't compile)
  1857
+        // constructor in different separate namespace (won't compile)
1858 1858
         checkUninitVar("namespace Output\n"
1859 1859
                        "{\n"
1860 1860
                        "    class Foo\n"
@@ -1873,7 +1873,7 @@ class TestClass : public TestFixture
1873 1873
                        "}\n");
1874 1874
         ASSERT_EQUALS("", errout.str());
1875 1875
 
1876  
-        // constructor in nested seperate namespace
  1876
+        // constructor in nested separate namespace
1877 1877
         checkUninitVar("namespace A\n"
1878 1878
                        "{\n"
1879 1879
                        "    namespace Output\n"
@@ -1895,7 +1895,7 @@ class TestClass : public TestFixture
1895 1895
                        "}\n");
1896 1896
         ASSERT_EQUALS("[test.cpp:15]: (warning) Member variable not initialized in the constructor 'Foo::mMember'\n", errout.str());
1897 1897
 
1898  
-        // constructor in nested different seperate namespace
  1898
+        // constructor in nested different separate namespace
1899 1899
         checkUninitVar("namespace A\n"
1900 1900
                        "{\n"
1901 1901
                        "    namespace Output\n"
@@ -1917,7 +1917,7 @@ class TestClass : public TestFixture
1917 1917
                        "}\n");
1918 1918
         ASSERT_EQUALS("", errout.str());
1919 1919
 
1920  
-        // constructor in nested different seperate namespace
  1920
+        // constructor in nested different separate namespace
1921 1921
         checkUninitVar("namespace A\n"
1922 1922
                        "{\n"
1923 1923
                        "    namespace Output\n"
@@ -2467,7 +2467,7 @@ class TestClass : public TestFixture
2467 2467
         ASSERT_EQUALS("[fred.h:6]: (warning) Member variable not initialized in the constructor 'Fred::i'\n", errout.str());
2468 2468
     }
2469 2469
 
2470  
-    // Borland C++: No FP for published pointers - they are automaticly initialized
  2470
+    // Borland C++: No FP for published pointers - they are automatically initialized
2471 2471
     void uninitVarPublished()
2472 2472
     {
2473 2473
         checkUninitVar("class Fred\n"
@@ -3264,7 +3264,7 @@ class TestClass : public TestFixture
3264 3264
         ASSERT_EQUALS("[test.cpp:7] -> [test.cpp:3]: (style) The function 'Fred::foo' can be const\n"
3265 3265
                       "[test.cpp:7] -> [test.cpp:4]: (style) The function 'Fred::foo' can be const\n", errout.str());
3266 3266
 
3267  
-        // check functions with different or missing paramater names
  3267
+        // check functions with different or missing parameter names
3268 3268
         checkConst("class Fred {\n"
3269 3269
                    "    std::string s;\n"
3270 3270
                    "    void foo1(int, int);\n"
2  test/testcppcheck.cpp
@@ -189,7 +189,7 @@ class TestCppcheck : public TestFixture
189 189
     {
190 190
         TiXmlDocument doc;
191 191
         doc.Parse(xmlData);
192  
-        // parsing must be successfull
  192
+        // parsing must be successful
193 193
         ASSERT_EQUALS(false, doc.Error());
194 194
         // root element must be "results"
195 195
         TiXmlElement* root = doc.FirstChildElement();
6  test/testmathlib.cpp
@@ -197,19 +197,19 @@ class TestMathLib : public TestFixture
197 197
         ASSERT_EQUALS(false, MathLib::isInt("-1.E+1"));
198 198
         ASSERT_EQUALS(false, MathLib::isInt("+1.E-1"));
199 199
         ASSERT_EQUALS(false, MathLib::isInt(" 1.0E+1"));
200  
-        // with whitspaces in front
  200
+        // with whitespace in front
201 201
         ASSERT_EQUALS(false, MathLib::isInt(" 1.0E-1"));
202 202
         ASSERT_EQUALS(false, MathLib::isInt(" -1.0E+1"));
203 203
         ASSERT_EQUALS(false, MathLib::isInt(" +1.0E-1"));
204 204
         ASSERT_EQUALS(false, MathLib::isInt(" -1.E+1"));
205 205
         ASSERT_EQUALS(false, MathLib::isInt(" +1.E-1"));
206  
-        // with whitspaces in front and end
  206
+        // with whitespace in front and end
207 207
         ASSERT_EQUALS(false, MathLib::isInt(" 1.0E-1  "));
208 208
         ASSERT_EQUALS(false, MathLib::isInt(" -1.0E+1  "));
209 209
         ASSERT_EQUALS(false, MathLib::isInt(" +1.0E-1  "));
210 210
         ASSERT_EQUALS(false, MathLib::isInt(" -1.E+1  "));
211 211
         ASSERT_EQUALS(false, MathLib::isInt(" +1.E-1  "));
212  
-        // with whitspaces in front and end
  212
+        // with whitespace in front and end
213 213
         ASSERT_EQUALS(false, MathLib::isInt("1.0E-1  "));
214 214
         ASSERT_EQUALS(false, MathLib::isInt("-1.0E+1  "));
215 215
         ASSERT_EQUALS(false, MathLib::isInt("+1.0E-1  "));
2  test/testpreprocessor.cpp
@@ -2022,7 +2022,7 @@ class TestPreprocessor : public TestFixture
2022 2022
         Settings settings;
2023 2023
         Preprocessor preprocessor(&settings, this);
2024 2024
         preprocessor.read(istr, "test.cpp", 0);
2025  
-        ASSERT_EQUALS("[test.cpp:1]: (error) The code contains characters that are unhandled. Neither unicode nor extended ascii are supported. (line=1, character code=c8)\n", errout.str());
  2025
+        ASSERT_EQUALS("[test.cpp:1]: (error) The code contains characters that are unhandled. Neither Unicode nor extended ASCII are supported. (line=1, character code=c8)\n", errout.str());
2026 2026
     }
2027 2027
 
2028 2028
     void unicodeInComment()
8  test/testsimplifytokens.cpp
@@ -51,7 +51,7 @@ class TestSimplifyTokens : public TestFixture
51 51
         TEST_CASE(double_plus);
52 52
         TEST_CASE(redundant_plus);
53 53
         TEST_CASE(parantheses1);
54  
-        TEST_CASE(paranthesesVar);      // Remove redundant parantheses around variable .. "( %var% )"
  54
+        TEST_CASE(paranthesesVar);      // Remove redundant parentheses around variable .. "( %var% )"
55 55
         TEST_CASE(declareVar);
56 56
 
57 57
         TEST_CASE(declareArray);
@@ -607,7 +607,7 @@ class TestSimplifyTokens : public TestFixture
607 607
 
608 608
     void paranthesesVar()
609 609
     {
610  
-        // remove parantheses..
  610
+        // remove parentheses..
611 611
         ASSERT_EQUALS("= p ;", tok("= (p);"));
612 612
         ASSERT_EQUALS("if ( a < p ) { }", tok("if(a<(p)){}"));
613 613
         ASSERT_EQUALS("void f ( ) { int p ; if ( p == -1 ) { } }", tok("void f(){int p; if((p)==-1){}}"));
@@ -622,7 +622,7 @@ class TestSimplifyTokens : public TestFixture
622 622
         ASSERT_EQUALS("void f ( ) { int * p ; * p = 1 ; }", tok("void f(){int *p; *(p) = 1;}"));
623 623
         ASSERT_EQUALS("void f ( ) { int p ; if ( p ) { } p = 1 ; }", tok("void f(){int p; if ( p ) { } (p) = 1;}"));
624 624
 
625  
-        // keep parantheses..
  625
+        // keep parentheses..
626 626
         ASSERT_EQUALS("= a ;", tok("= (char)a;"));
627 627
         ASSERT_EQUALS("cast < char * > ( p )", tok("cast<char *>(p)"));
628 628
         ASSERT_EQUALS("return ( a + b ) * c ;", tok("return (a+b)*c;"));
@@ -2842,7 +2842,7 @@ class TestSimplifyTokens : public TestFixture
2842 2842
         ASSERT_EQUALS("\"\\\\x61\"", tok("\"\\\\x61\""));
2843 2843
 
2844 2844
         // These tests can fail, if other characters are handled
2845  
-        // more correctly. But fow now all non null characters should
  2845
+        // more correctly. But for now all non null characters should
2846 2846
         // become 'a'
2847 2847
         ASSERT_EQUALS("\"a\"", tok("\"\\x62\""));
2848 2848
         ASSERT_EQUALS("\"a\"", tok("\"\\177\""));
2  test/testsuite.h
@@ -51,7 +51,7 @@ class TestFixture : public ErrorLogger
51 51
     void assertEquals(const char *filename, int linenr, const std::string &expected, const std::string &actual, const std::string &msg = "");
52 52
 
53 53
     // the vars expected and actual need to be of type double, in order to avoid overflow of unsigned int
54  
-    // e.g: ASSERT_EQUALS(-100.0, MathLib::toDoubleNumber("-1.0E+2")); whould not work without this.
  54
+    // e.g: ASSERT_EQUALS(-100.0, MathLib::toDoubleNumber("-1.0E+2")); would not work without this.
55 55
     void assertEquals(const char *filename, int linenr, double expected, double actual, const std::string &msg="");
56 56
 
57 57
     void todoAssertEquals(const char *filename, int linenr, const std::string &expected, const std::string &actual);
8  test/testtokenize.cpp
@@ -145,7 +145,7 @@ class TestTokenizer : public TestFixture
145 145
         TEST_CASE(varid14);
146 146
         TEST_CASE(varid15);
147 147
         TEST_CASE(varid16);
148  
-        TEST_CASE(varid17); // ticket #1810
  148
+        TEST_CASE(varid17);   // ticket #1810
149 149
         TEST_CASE(varid18);
150 150
         TEST_CASE(varid19);
151 151
         TEST_CASE(varid20);
@@ -154,8 +154,8 @@ class TestTokenizer : public TestFixture
154 154
         TEST_CASE(varid23);
155 155
         TEST_CASE(varid24);
156 156
         TEST_CASE(varid25);
157  
-        TEST_CASE(varid26);  // ticket #1967 (list of function pointers)
158  
-        TEST_CASE(varid27);		// Ticket #2280 (same name for namespace and variable)
  157
+        TEST_CASE(varid26);   // ticket #1967 (list of function pointers)
  158
+        TEST_CASE(varid27);	// Ticket #2280 (same name for namespace and variable)
159 159
         TEST_CASE(varidFunctionCall1);
160 160
         TEST_CASE(varidFunctionCall2);
161 161
         TEST_CASE(varidStl);
@@ -509,7 +509,7 @@ class TestTokenizer : public TestFixture
509 509
 
510 510
 
511 511
 
512  
-    // Dont remove "(int *)"..
  512
+    // Dont remove "(int *)"..
513 513
     void removeCast1()
514 514
     {
515 515
         const char code[] = "int *f(int *);";

0 notes on commit 46a1118

Please sign in to comment.
Something went wrong with that request. Please try again.