fixed some warnings

This commit is contained in:
Ed Hartnett 2017-11-04 05:34:36 -06:00
parent bedff7cfc6
commit 3301c3f8dc
5 changed files with 3 additions and 5 deletions

View File

@ -65,7 +65,7 @@ NCD4_dechunk(NCD4meta* metadata)
/* setup as dmr only */
metadata->serial.dmr = (char*)metadata->serial.rawdata; /* temp */
metadata->serial.dmr[metadata->serial.rawsize-1] = '\0';
metadata->serial.dmr = strdup(q);
metadata->serial.dmr = strdup((char *)q);
if(metadata->serial.dmr == NULL)
return THROW(NC_ENOMEM);
return THROW(NC_NOERR);

View File

@ -180,7 +180,6 @@ fillstruct(NCD4meta* meta, NCD4node* type, void** offsetp, void** dstp, NClist*
#ifdef CLEARSTRUCT
/* Avoid random data within aligned structs */
d4size_t prevoffset = 0;
memset(dst,0,type->meta.memsize);
#endif

View File

@ -442,7 +442,6 @@ fail:
static void
applyclientparamcontrols(NCD4INFO* info)
{
NCD4meta* meta = info->substrate.metadata;
const char* value;
/* clear the flags */

View File

@ -86,7 +86,7 @@ rctrim(char* text)
static NClist*
rcorder(NClist* rc)
{
int i,j;
int i;
int len = nclistlength(rc);
NClist* newrc = nclistnew();
if(rc == NULL || len == 0) return newrc;

View File

@ -235,7 +235,7 @@ walkSeq(NCD4meta* compiler, NCD4node* topvar, NCD4node* vlentype, void** offsetp
swapinline64(&recordcount);
basetype = vlentype->basetype; /* This may be of any type potentially */
assert(basetype->sort = NCD4_TYPE);
assert(basetype->sort == NCD4_TYPE);
for(i=0;i<recordcount;i++) {
switch(basetype->subsort) {