Changeset: 9290ec648fa5 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=9290ec648fa5
Modified Files:
        clients/mapilib/mapi.c
        common/utils/conversion.c
        monetdb5/modules/atoms/blob.c
Branch: protocol
Log Message:

Compilation fixes.


diffs (78 lines):

diff --git a/clients/mapilib/mapi.c b/clients/mapilib/mapi.c
--- a/clients/mapilib/mapi.c
+++ b/clients/mapilib/mapi.c
@@ -4145,7 +4145,7 @@ static char* mapi_convert_blob(struct Ma
        if (length < 0) {
                return NULL;
        }
-       if (24 + 3 * length > col->dynamic_write_bufsiz) {
+       if (24 + 3 * length > (lng) col->dynamic_write_bufsiz) {
                col->dynamic_write_bufsiz = (size_t) 24 + 3 * length;
                if (col->dynamic_write_buf) free(col->dynamic_write_buf);
                col->dynamic_write_buf = malloc(col->dynamic_write_bufsiz);
@@ -4153,7 +4153,7 @@ static char* mapi_convert_blob(struct Ma
                        return NULL;
                }
        }
-       if (conversion_blob_to_string(col->dynamic_write_buf, 
col->dynamic_write_bufsiz, col->buffer_ptr + sizeof(lng), length) < 0) {
+       if (conversion_blob_to_string(col->dynamic_write_buf, (int) 
col->dynamic_write_bufsiz, col->buffer_ptr + sizeof(lng), length) < 0) {
                return NULL;
        }
        return (char*) col->dynamic_write_buf;
@@ -4258,7 +4258,7 @@ read_into_cache(MapiHdl hdl, int lookahe
                                                !mnstr_readInt(mid->from, 
&result->fields[i].scale)) {
                                        return mapi_setError(mid, "read error 
from stream while reading result set", "read_into_cache", MERROR);
                                }
-                               
+
                                if (!mnstr_readInt(mid->from, &null_len)) {
                                        return mapi_setError(mid, "read error 
from stream while reading result set", "read_into_cache", MERROR);
                                }
diff --git a/common/utils/conversion.c b/common/utils/conversion.c
--- a/common/utils/conversion.c
+++ b/common/utils/conversion.c
@@ -357,7 +357,7 @@ conversion_blob_to_string(char *dst, int
 {
        char *s;
        size_t i;
-       size_t expectedlen;
+       int expectedlen;
 
        if (nitems == ~(size_t) 0)
                expectedlen = 4;
diff --git a/monetdb5/modules/atoms/blob.c b/monetdb5/modules/atoms/blob.c
--- a/monetdb5/modules/atoms/blob.c
+++ b/monetdb5/modules/atoms/blob.c
@@ -31,6 +31,7 @@
  */
 #include "monetdb_config.h"
 #include "blob.h"
+#include <conversion.h>
 
 int TYPE_blob;
 int TYPE_sqlblob;
@@ -228,24 +229,6 @@ sqlblob_tostr(str *tostr, int *l, const 
        }
 
        return conversion_blob_to_string(*tostr, expectedlen, p->data, 
p->nitems);
-
-       // if (p->nitems == ~(size_t) 0) {
-       //      strcpy(*tostr, "nil");
-       //      return 3;
-       // }
-
-       // strcpy(*tostr, "\0");
-       // s = *tostr;
-
-       // for (i = 0; i < p->nitems; i++) {
-       //      int val = (p->data[i] >> 4) & 15;
-
-       //      *s++ = hexit[val];
-       //      val = p->data[i] & 15;
-       //      *s++ = hexit[val];
-       // }
-       // *s = '\0';
-       // return (int) (s - *tostr); /* 64bit: check for overflow */
 }
 
 static int
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to