cwFileSys.cpp, cwMtx.h, cwObject.cpp : minor changes to eliminate warning during non-debug build.

This commit is contained in:
kevin 2021-02-21 08:53:39 -05:00
parent ae68c2677c
commit e86067659a
3 changed files with 98 additions and 94 deletions

View File

@ -299,7 +299,8 @@ cw::filesys::pathPart_t* cw::filesys::pathParts( const char* pathStr )
// if pathStr is empty
if( n == 0 )
return nullptr;
else
{
char buf[n+1];
buf[n] = 0;
@ -403,7 +404,7 @@ cw::filesys::pathPart_t* cw::filesys::pathParts( const char* pathStr )
if( en == 0 )
rp->extStr = nullptr;
}
errLabel:
return rp;
}

View File

@ -145,6 +145,9 @@ namespace cw
if( cwIsFlag(flags,kDuplDataFl) )
{
assert( aliasFl == false );
assert( base != nullptr );
if( base != nullptr )
memcpy(m->base,base, eleN*sizeof(T) );
}

View File

@ -233,8 +233,8 @@ namespace cw
unsigned _objTypeToStringUInt16( const object_t* o, char* buf, unsigned n ) { return toText(buf,n,o->u.u16); }
unsigned _objTypeToStringInt32( const object_t* o, char* buf, unsigned n ) { return toText(buf,n,o->u.i32); }
unsigned _objTypeToStringUInt32( const object_t* o, char* buf, unsigned n ) { return toText(buf,n,o->u.u32); }
unsigned _objTypeToStringInt64( const object_t* o, char* buf, unsigned n ) { assert(0); /*return toText(buf,n,o->u.i64);*/ }
unsigned _objTypeToStringUInt64( const object_t* o, char* buf, unsigned n ) { assert(0); /*return toText(buf,n,o->u.u64);*/ }
unsigned _objTypeToStringInt64( const object_t* o, char* buf, unsigned n ) { assert(0); /*return toText(buf,n,o->u.i64);*/ return kInvalidOpRC; }
unsigned _objTypeToStringUInt64( const object_t* o, char* buf, unsigned n ) { assert(0); /*return toText(buf,n,o->u.u64);*/ return kInvalidOpRC; }
unsigned _objTypeToStringBool( const object_t* o, char* buf, unsigned n ) { return toText(buf,n,o->u.b); }
unsigned _objTypeToStringFloat( const object_t* o, char* buf, unsigned n ) { return toText(buf,n,o->u.f); }
unsigned _objTypeToStringDouble( const object_t* o, char* buf, unsigned n ) { return toText(buf,n,o->u.d); }
@ -325,7 +325,7 @@ namespace cw
object_t* _objTypeDuplDouble( const struct object_str* src, struct object_str* parent ) { return _objCreateValueNode<double >(parent,src->u.d ); }
object_t* _objTypeDuplString( const struct object_str* src, struct object_str* parent ) { return _objCreateValueNode<char* >(parent,mem::duplStr(src->u.str)); }
object_t* _objTypeDuplCString(const struct object_str* src, struct object_str* parent ) { return _objCreateValueNode<const char*>(parent,mem::duplStr(src->u.str));}
object_t* _objTypeDuplVect( const struct object_str* src, struct object_str* parent ) { assert(0); }
object_t* _objTypeDuplVect( const struct object_str* src, struct object_str* parent ) { assert(0); return nullptr; }
object_t* _objTypeDuplPair( const struct object_str* src, struct object_str* parent ) { return _objTypeDuplContainer(src,parent); }
object_t* _objTypeDuplList( const struct object_str* src, struct object_str* parent ) { return _objTypeDuplContainer(src,parent); }
object_t* _objTypeDuplDict( const struct object_str* src, struct object_str* parent ) { return _objTypeDuplContainer(src,parent); }