rem: dataBytes = WMDataBytes(data);
add: dataBytes = (const unsigned char *)WMDataBytes(data);
context: WMSendConnectionData(WMConnection *cPtr, WMData *data) /*FOLD00*/{    int bytes, pos, len, totalTransfer;    TimeoutData *tPtr = &cPtr->sendTimeout;    const void *dataBytes;    wassertrv(cPtr->state!=WCNotConnected && cPtr->state!=WCListening, -1);    wassertrv(cPtr->state!=WCInProgress && cPtr->state!=WCFailed, -1);    if (cPtr->state!=WCConnected)        return -1;    /* If we have no data just flush the queue, else try to send data */    if (data && WMGetDataLength(data)>0) {        WMPutInBag(cPtr->outputQueue, WMRetainData(data));        /* If there already was something in queue, and also a write input         * handler is established, it means we were unable to send, so         * return and let the write handler notify us when we can send.         */        if (WMGetBagItemCount(cPtr->outputQueue)>1 && cPtr->handler.write)            return 0;    }    totalTransfer = 0;    while (WMGetBagItemCount(cPtr->outputQueue) > 0) {        data = WMGetFromBag(cPtr->outputQueue, 0);        dataBytes = WMDataBytes(data);        len = WMGetDataLength(data);        pos = cPtr->bufPos; /* where we're left last time */        while(pos < len) {        again:            bytes = write(cPtr->sock, dataBytes+pos, len - pos);            if(bytes<0) {                switch (errno) {                case EINTR:                    goto again;                case EWOULDBLOCK:                    /* save the position where we're left and add a timeout */                    cPtr->bufPos = pos;                    if (!tPtr->handler) {                        tPtr->handler = WMAddTimerHandler(tPtr->timeout*1000,                                                          sendTimeout, cPtr);                    }                    if (!cPtr->handler.write) {                        cPtr->handler.write =                            WMAddInputHandler(cPtr->sock, WIWriteMask,                                              inputHandler, cPtr);                    }                    return totalTransfer;                default:                    WCErrorCode = errno;                    cPtr->state = WCDied;                    /*clearOutputQueue(cPtr);*/                    removeAllHandlers(cPtr);                    if (cPtr->delegate && cPtr->delegate->didDie)                        (*cPtr->delegate->didDie)(cPtr->delegate, cPtr);                    return -1;                }            }            pos += bytes;            totalTransfer += bytes;        }        WMReleaseData(data);        WMDeleteFromBag(cPtr->outputQueue, 0);        cPtr->bufPos = 0;        if (tPtr->handler) {            WMDeleteTimerHandler(tPtr->handler);            tPtr->handler = NULL;        }        if (cPtr->handler.write) {            WMDeleteInputHandler(cPtr->handler.write);            cPtr->handler.write = NULL;        }    }    return totalTransfer;}