Fixed GCC warnings. unused variable, shadow variable.
This commit is contained in:
parent
f4aaa76639
commit
8bb8290a6f
|
@ -324,8 +324,8 @@ namespace {
|
||||||
{
|
{
|
||||||
int type = -1;
|
int type = -1;
|
||||||
pid_t killid = getpid();
|
pid_t killid = getpid();
|
||||||
const ucontext_t* const uc = reinterpret_cast<const ucontext_t*>(context);
|
|
||||||
#if defined(__linux__) && defined(REG_ERR)
|
#if defined(__linux__) && defined(REG_ERR)
|
||||||
|
const ucontext_t* const uc = reinterpret_cast<const ucontext_t*>(context);
|
||||||
killid = (pid_t) syscall(SYS_gettid);
|
killid = (pid_t) syscall(SYS_gettid);
|
||||||
if (uc) {
|
if (uc) {
|
||||||
type = (int)uc->uc_mcontext.gregs[REG_ERR] & 2;
|
type = (int)uc->uc_mcontext.gregs[REG_ERR] & 2;
|
||||||
|
|
|
@ -3182,10 +3182,10 @@ bool Tokenizer::simplifySizeof()
|
||||||
|
|
||||||
const Token* tok2 = tok->next();
|
const Token* tok2 = tok->next();
|
||||||
do {
|
do {
|
||||||
const MathLib::bigint arraySize = MathLib::toLongNumber(tok2->strAt(1));
|
const MathLib::bigint num = MathLib::toLongNumber(tok2->strAt(1));
|
||||||
if (arraySize<0)
|
if (num<0)
|
||||||
break; // #6940 negative number
|
break; // #6940 negative number
|
||||||
size *= (unsigned)arraySize;
|
size *= (unsigned)num;
|
||||||
tok2 = tok2->tokAt(3);
|
tok2 = tok2->tokAt(3);
|
||||||
} while (Token::Match(tok2, "[ %num% ]"));
|
} while (Token::Match(tok2, "[ %num% ]"));
|
||||||
if (Token::Match(tok2, "[;=]")) {
|
if (Token::Match(tok2, "[;=]")) {
|
||||||
|
|
Loading…
Reference in New Issue