Commit fe184ac5 authored by Oliver Heidmann's avatar Oliver Heidmann
Browse files

removed const since c++ does not allow to use memcpy with a const lvalue...

removed const since c++ does not allow to use memcpy with a const lvalue destination, removed array length in array parameters brackets, changed type of len from size_t to int since it is only used as int and replaced anonym funtion that cast len to int by &len
parent 54df2ac5
......@@ -319,7 +319,7 @@ int cdiInqAccesstype(int streamID);
int getByteswap(int byteorder);
void cdiStreamGetIndexList(unsigned numIDs, int IDs[numIDs]);
void cdiStreamGetIndexList(unsigned numIDs, int IDs[]);
void cdiInitialize(void);
......@@ -329,7 +329,7 @@ int str2uuid(const char *uuidstr, unsigned char *uuid);
static inline int cdiUUIDIsNull(const unsigned char *uuid)
{
static const unsigned char uuid_nil[CDI_UUID_SIZE];
static unsigned char uuid_nil[CDI_UUID_SIZE];
return !memcmp(uuid, uuid_nil, CDI_UUID_SIZE);
}
......
......@@ -431,7 +431,7 @@ void *reshGetValue(const char * caller, const char* expressionString, cdiResH re
/**************************************************************/
void reshGetResHListOfType(unsigned numIDs, int resHs[numIDs], const resOps *ops)
void reshGetResHListOfType(unsigned numIDs, int resHs[], const resOps *ops)
{
xassert ( resHs && ops );
......
......@@ -63,7 +63,7 @@ void * reshGetValue(const char* caller, const char* expressionString, cdiResH id
#define reshGetVal(resH, ops) reshGetValue(__func__, #resH, resH, ops)
void reshGetResHListOfType(unsigned numIDs, int IDs[numIDs], const resOps *ops);
void reshGetResHListOfType(unsigned numIDs, int IDs[], const resOps *ops);
enum cdiApplyRet {
CDI_APPLY_ERROR = -1,
......
......@@ -53,8 +53,8 @@ serializeStrTabPack(const char **strTab, int numStr,
xassert(numStr >= 0);
for (size_t i = 0; i < (size_t)numStr; ++i)
{
size_t len = strlen(strTab[i]);
serializePack(&(int){(int)len}, 1, DATATYPE_INT,
int len = (int)strlen(strTab[i]);
serializePack(&len, 1, DATATYPE_INT,
buf, buf_size, position, context);
serializePack(strTab[i], (int)len, DATATYPE_TXT,
buf, buf_size, position, context);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment