Skip to content
Snippets Groups Projects
Commit b04c5e9c authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

Fix g++ errors.

parent 003fcaa2
No related branches found
No related tags found
1 merge request!7Replaced gridDefDatatype()/gridInqDatatype() by cdiDefKeyInt()/cdiInqKeyInt()...
......@@ -90,7 +90,7 @@ sema_post(sema_t *s)
static
void *workerMain(void *arg)
{
AsyncJob *communicator = arg;
AsyncJob *communicator = (AsyncJob *)arg;
while (true)
{
......@@ -137,10 +137,10 @@ int AsyncWorker_init(AsyncManager **jobManager, int threadCount)
if (*jobManager) return CDI_NOERR;
#ifdef HAVE_LIBPTHREAD
*jobManager = malloc(sizeof(AsyncManager));
*jobManager = (AsyncManager *)malloc(sizeof(AsyncManager));
if(!*jobManager) return CDI_ESYSTEM;
(*jobManager)->workerCount = threadCount;
(*jobManager)->communicators = malloc(threadCount*sizeof(AsyncJob));
(*jobManager)->communicators = (AsyncJob *)malloc(threadCount*sizeof(AsyncJob));
if (!(*jobManager)->communicators) xabort("memory allocation failure");
for (int i = 0; i < threadCount; i++) startWorker(&((*jobManager)->communicators[i]));
......
......@@ -7,11 +7,6 @@
#include "cdi_key.h"
#include "cdi_att.h"
extern int (*proj_lonlat_to_lcc_func)();
extern int (*proj_lcc_to_lonlat_func)();
extern int (*proj_lonlat_to_stere_func)();
extern int (*proj_stere_to_lonlat_func)();
typedef unsigned char mask_t;
typedef struct grid_t grid_t;
......
......@@ -118,7 +118,7 @@ serializeKeysUnpack(const void *buf, int buf_size, int *position, cdi_keys_t *ke
buffer = realloc(buffer, buffersize);
}
serializeUnpack(buf, buf_size, position, buffer, length, CDI_DATATYPE_TXT, context);
cdiDefVarKeyBytes(keysp, key, buffer, length);
cdiDefVarKeyBytes(keysp, key, (unsigned char *)buffer, length);
d2 ^= cdiCheckSum(CDI_DATATYPE_TXT, length, buffer);
}
else if (type == KEY_INT)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment