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

Compilation fixes.


diffs (88 lines):

diff --git a/clients/mapiclient/mclient.c b/clients/mapiclient/mclient.c
--- a/clients/mapiclient/mclient.c
+++ b/clients/mapiclient/mclient.c
@@ -1048,8 +1048,8 @@ mapi_escape_name(char *name) {
        char *buffer = startbuffer;
        if (!startbuffer) return NULL;
        if (strchr(name, ',') || strchr(name, ' ') || strchr(name, '\t') || 
strchr(name, '#')) {
+               char *p;
                *buffer++ = '"';
-               char *p;
                for (p = name; *p; p++) {
                        if (*p == '"') {
                                *buffer++ = '\\';
diff --git a/clients/mapilib/mapi.c b/clients/mapilib/mapi.c
--- a/clients/mapilib/mapi.c
+++ b/clients/mapilib/mapi.c
@@ -6236,10 +6236,6 @@ mapi_set_compute_column_width(Mapi mid, 
 
 #define NUMERIC_CONVERSION(fromtpe, totpe, fromname, toname, MIN_VALUE, 
MAX_VALUE)                                                             \
        case SQL_BINARY_##fromname: {                                           
                                                                                
                                        \
-               fromtpe val = *((fromtpe*)col->buffer_ptr);                     
                                                                                
                                \
-               if (val < MIN_VALUE || val > MAX_VALUE) {                       
                                                                                
                                \
-                       return mapi_setError(hdl->mid, "Overflow when 
converting value.", "mapi_fetch_field_"#toname, MERROR);  \
-               }                                                               
                                                                                
                                                                        \
                *retval = (totpe) *((fromtpe*)col->buffer_ptr);                 
                                                                                
                        \
                return MOK;                                                     
                                                                                
                                                                \
        }
@@ -6251,11 +6247,15 @@ mapi_set_compute_column_width(Mapi mid, 
 #define HGE_CONVERSION(fromtpe, totpe, fromname, toname, MIN_VALUE, MAX_VALUE)
 #endif
 
-float STRTOF(const char *restrict str, char **restrict endptr, int base) {
+static float 
+STRTOF(const char *restrict str, char **restrict endptr, int base) {
+       (void) base;
        return strtof(str, endptr);
 }
 
-double STRTOD(const char *restrict str, char **restrict endptr, int base) {
+static double 
+STRTOD(const char *restrict str, char **restrict endptr, int base) {
+       (void) base;
        return strtod(str, endptr);
 }
 
@@ -6289,7 +6289,7 @@ mapi_fetch_field_##typename(MapiHdl hdl,
                }                                                               
                                                                                
                                                                        \
        }                                                                       
                                                                                
                                                                        \
        /* string conversion */                                                 
                                                                                
                                                \
-       mapi_fetch_field(hdl, fnr);                                             
                                                                                
                                                \
+       val = mapi_fetch_field(hdl, fnr);                                       
                                                                                
                                                        \
        if (hdl->mid->error != MOK)     {                                       
                                                                                
                                                \
                return hdl->mid->error;                                         
                                                                                
                                                \
        }                                                                       
                                                                                
                                                                        \
diff --git a/common/utils/conversion.c b/common/utils/conversion.c
--- a/common/utils/conversion.c
+++ b/common/utils/conversion.c
@@ -365,7 +365,6 @@ conversion_epoch_optional_tz_to_string(c
        short year;
        unsigned short month, day, hour, min, sec;
        unsigned int nanosecond;
-       lng time = *src;
        int res = 0;
        if (*src == null_value) {
                strcpy(dst, NULL_STRING);
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
@@ -211,8 +211,6 @@ blob_tostr(str *tostr, int *l, blob *p)
 int
 sqlblob_tostr(str *tostr, int *l, const blob *p)
 {
-       char *s;
-       size_t i;
        size_t expectedlen;
 
        if (p->nitems == ~(size_t) 0)
diff --git a/sql/backends/monet5/sql.c b/sql/backends/monet5/sql.c
--- a/sql/backends/monet5/sql.c
+++ b/sql/backends/monet5/sql.c
@@ -3400,7 +3400,6 @@ mvc_scalar_value_wrap(Client cntxt, MalB
        int *eclass = getArgReference_int(stk, pci, 6);
        ptr p = getArgReference(stk, pci, 7);
        int mtype = getArgType(mb, pci, 7);
-       int res_id;
        str msg;
        backend *b = NULL;
 
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to