--- parser3/src/classes/hash.C 2010/08/04 15:11:44 1.105 +++ parser3/src/classes/hash.C 2010/11/26 06:40:01 1.109 @@ -5,7 +5,7 @@ Author: Alexandr Petrosian (http://paf.design.ru) */ -static const char * const IDENT_HASH_C="$Date: 2010/08/04 15:11:44 $"; +static const char * const IDENT_HASH_C="$Date: 2010/11/26 06:40:01 $"; #include "classes.h" #include "pa_vmethod_frame.h" @@ -26,8 +26,6 @@ public: // VStateless_class public: MHash(); -public: // Methoded - bool used_directly() { return true; } }; // global variable @@ -70,9 +68,9 @@ public: empty(0) { } - bool add_column(SQL_Error& error, const char* str, size_t length) { + bool add_column(SQL_Error& error, const char* str, size_t ) { try { - columns+=new String(str, String::L_TAINTED, length); + columns+=new String(str, String::L_TAINTED /* no length as 0x00 can be inside */); return false; } catch(...) { error=SQL_Error("exception occured in Hash_sql_event_handlers::add_column"); @@ -109,9 +107,9 @@ public: return false; } - bool add_row_cell(SQL_Error& error, const char *ptr, size_t length) { + bool add_row_cell(SQL_Error& error, const char *ptr, size_t ) { try { - String& cell=*new String(ptr, String::L_TAINTED, length); + String& cell=*new String(ptr, String::L_TAINTED /* no length as 0x00 can be inside */); bool duplicate=false; if(one_bool_column) { @@ -491,10 +489,10 @@ static void _at(Request& r, MethodParams pos+=count; } - if(count && pos >= 0 && pos < count){ + if(count && pos >= 0 && (size_t)pos < count){ if(pos == 0) r.write_assign_lang(*hash.first_value()); - else if(pos == count-1) + else if((size_t)pos == count-1) r.write_assign_lang(*hash.last_value()); else for(HashStringValue::Iterator i(hash); i; i.next(), pos-- )