Cppcheck
Enumerations | Functions | Variables
checkio.cpp File Reference
#include "checkio.h"
#include "astutils.h"
#include "errortypes.h"
#include "library.h"
#include "mathlib.h"
#include "platform.h"
#include "settings.h"
#include "symboldatabase.h"
#include "token.h"
#include "tokenize.h"
#include "utils.h"
#include "vfvalue.h"
#include <algorithm>
#include <cctype>
#include <cstdlib>
#include <functional>
#include <list>
#include <map>
#include <set>
#include <sstream>
#include <unordered_set>
#include <utility>
#include <vector>

Go to the source code of this file.

Enumerations

enum class  OpenMode {
  CLOSED , READ_MODE , WRITE_MODE , RW_MODE ,
  UNKNOWN_OM
}
 

Functions

static OpenMode getMode (const std::string &str)
 
static bool findFormat (nonneg int arg, const Token *firstArg, const Token *&formatStringTok, const Token *&formatArgTok)
 
static bool typesMatch (const std::string &iToTest, const std::string &iTypename, const std::string &iOptionalPrefix="std::")
 
static void printfFormatType (std::ostream &os, const std::string &specifier, bool isUnsigned)
 

Variables

static const CWE CWE119 (119U)
 
static const CWE CWE398 (398U)
 
static const CWE CWE664 (664U)
 
static const CWE CWE685 (685U)
 
static const CWE CWE686 (686U)
 
static const CWE CWE687 (687U)
 
static const CWE CWE704 (704U)
 
static const CWE CWE910 (910U)
 
static const std::set< std::string > stl_container
 

Enumeration Type Documentation

◆ OpenMode

enum OpenMode
strong
Enumerator
CLOSED 
READ_MODE 
WRITE_MODE 
RW_MODE 
UNKNOWN_OM 

Definition at line 99 of file checkio.cpp.

Function Documentation

◆ findFormat()

static bool findFormat ( nonneg int  arg,
const Token firstArg,
const Token *&  formatStringTok,
const Token *&  formatArgTok 
)
static

◆ getMode()

static OpenMode getMode ( const std::string &  str)
static

Definition at line 100 of file checkio.cpp.

References READ_MODE, RW_MODE, UNKNOWN_OM, and WRITE_MODE.

Referenced by CheckIO::checkFileUsage().

◆ printfFormatType()

static void printfFormatType ( std::ostream &  os,
const std::string &  specifier,
bool  isUnsigned 
)
static

◆ typesMatch()

static bool typesMatch ( const std::string &  iToTest,
const std::string &  iTypename,
const std::string &  iOptionalPrefix = "std::" 
)
inlinestatic

Definition at line 526 of file checkio.cpp.

Referenced by CheckIO::checkFormatString().

Variable Documentation

◆ CWE119

const CWE CWE119(119U) ( 119U  )
static

◆ CWE398

const CWE CWE398(398U) ( 398U  )
static

◆ CWE664

const CWE CWE664(664U) ( 664U  )
static

◆ CWE685

const CWE CWE685(685U) ( 685U  )
static

◆ CWE686

const CWE CWE686(686U) ( 686U  )
static

◆ CWE687

const CWE CWE687(687U) ( 687U  )
static

◆ CWE704

const CWE CWE704(704U) ( 704U  )
static

◆ CWE910

const CWE CWE910(910U) ( 910U  )
static

◆ stl_container

const std::set<std::string> stl_container
static
Initial value:
= {
"array", "bitset", "deque", "forward_list",
"hash_map", "hash_multimap", "hash_set",
"list", "map", "multimap", "multiset",
"priority_queue", "queue", "set", "stack",
"unordered_map", "unordered_multimap", "unordered_multiset", "unordered_set", "vector"
}

Definition at line 1629 of file checkio.cpp.

Referenced by CheckIO::ArgumentInfo::isStdContainer().