diff --git a/src/ceval.h b/src/ceval.h index 995bb5c0..7d7aec83 100644 --- a/src/ceval.h +++ b/src/ceval.h @@ -725,8 +725,10 @@ __NEXT_STEP:; /**********************************************************************/ UNREACHABLE(); }catch(HandledException& e){ + PK_UNUSED(e); continue; }catch(UnhandledException& e){ + PK_UNUSED(e); PyObject* obj = POPX(); Exception& _e = CAST(Exception&, obj); _e.st_push(frame->snapshot()); @@ -742,6 +744,7 @@ __NEXT_STEP:; if(frame.index < base_id) throw ToBeRaisedException(); need_raise = true; }catch(ToBeRaisedException& e){ + PK_UNUSED(e); need_raise = true; } } diff --git a/src/cffi.h b/src/cffi.h index fee224a3..98bc8571 100644 --- a/src/cffi.h +++ b/src/cffi.h @@ -196,8 +196,8 @@ struct C99Struct{ char* p; int size; - void _init(int size){ - this->size = size; + void _init(int new_size){ + this->size = new_size; if(size <= INLINE_SIZE){ p = _inlined; }else{ diff --git a/src/config.h b/src/config.h index 3e9523e5..339b74a6 100644 --- a/src/config.h +++ b/src/config.h @@ -66,9 +66,9 @@ namespace pkpy{ #ifdef _MSC_VER #pragma warning (disable:4267) -#pragma warning (disable:4101) +#pragma warning (disable:4100) #pragma warning (disable:4244) -#define _CRT_NONSTDC_NO_DEPRECATE +#define strdup _strdup #endif #ifdef _MSC_VER diff --git a/src/lexer.h b/src/lexer.h index f5312c33..30ad2353 100644 --- a/src/lexer.h +++ b/src/lexer.h @@ -382,7 +382,8 @@ struct Lexer { add_token(TK("@num"), Number::stoi(m[0], &size, base)); } PK_ASSERT((int)size == (int)m.length()); - }catch(std::exception& _){ + }catch(std::exception& e){ + PK_UNUSED(e); SyntaxError("invalid number literal"); } }