Changeset: 431c6b1e7af4 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/431c6b1e7af4
Modified Files:
sql/backends/monet5/copy.c
sql/backends/monet5/copy.h
sql/backends/monet5/copy_misc.c
sql/backends/monet5/copy_scan.c
Branch: pp_hashjoin
Log Message:
more type fixing
diffs (119 lines):
diff --git a/sql/backends/monet5/copy.c b/sql/backends/monet5/copy.c
--- a/sql/backends/monet5/copy.c
+++ b/sql/backends/monet5/copy.c
@@ -209,12 +209,12 @@ reader_new(stream *s, BUN offset, BUN ma
r->done = false;
r->error = false;
r->col_sep_str = (unsigned char*)col_sep_str;
- r->col_sep_len = strlen(col_sep_str);
+ r->col_sep_len = (int)strlen(col_sep_str);
r->line_sep_str = (unsigned char*)line_sep_str;
- r->line_sep_len = strlen(line_sep_str);
+ r->line_sep_len = (int)strlen(line_sep_str);
r->quote_str = (unsigned char*)quote_str;
r->null_repr = (unsigned char*)null_repr;
- r->null_repr_len = strlen(null_repr);
+ r->null_repr_len = (int)strlen(null_repr);
r->escape_enabled = escape_enabled;
r->best_effort = best_effort;
return r;
@@ -570,7 +570,7 @@ COPYsplitlines(Client cntxt, MalBlkPtr m
sleep_ns(1);
if (!r->done)
- p->seqnr = r->bs->seq[p->wid];
+ p->seqnr = (int)r->bs->seq[p->wid];
else
p->seqnr = -2;
if (!r->done && !r->error) {
diff --git a/sql/backends/monet5/copy.h b/sql/backends/monet5/copy.h
--- a/sql/backends/monet5/copy.h
+++ b/sql/backends/monet5/copy.h
@@ -87,7 +87,7 @@ struct error_handling {
void copy_init_error_handling(struct error_handling *admin, Client cntxt, lng
starting_row, int default_col_no, const char *column_name, bat rows);
void copy_error_handling_inhibit_deletes(struct error_handling *admin);
-gdk_return copy_report_error(struct error_handling *admin, int rel_row, int
column, _In_z_ _Printf_format_string_ const char *restrict format, ...)
+gdk_return copy_report_error(struct error_handling *admin, lng rel_row, int
column, _In_z_ _Printf_format_string_ const char *restrict format, ...)
__attribute__((__format__(__printf__, 4, 5)));
str copy_check_too_many_errors(struct error_handling *admin, const char
*fname);
const char *copy_error_message(struct error_handling *admin);
@@ -156,15 +156,15 @@ struct scan_state {
extern str scan_fields(
struct error_handling *errors, struct scan_state *state,
- unsigned char *null_repr, int null_repr_len, int ncols, int nrows, int
**columns);
+ unsigned char *null_repr, int null_repr_len, int ncols, lng nrows, int
**columns);
extern str scan_fields1( /* no quote_char, sep len == 1 */
struct error_handling *errors, struct scan_state *state,
- unsigned char *null_repr, int null_repr_len, int ncols, int nrows, int
**columns);
+ unsigned char *null_repr, int null_repr_len, int ncols, lng nrows, int
**columns);
extern str scan_fieldsN(
struct error_handling *errors, struct scan_state *state,
- unsigned char *null_repr, int null_repr_len, int ncols, int nrows, int
**columns);
+ unsigned char *null_repr, int null_repr_len, int ncols, lng nrows, int
**columns);
////////////////////////////////////////////////////////////////////////
diff --git a/sql/backends/monet5/copy_misc.c b/sql/backends/monet5/copy_misc.c
--- a/sql/backends/monet5/copy_misc.c
+++ b/sql/backends/monet5/copy_misc.c
@@ -179,7 +179,7 @@ too_many_errors(struct error_handling *a
}
gdk_return
-copy_report_error(struct error_handling *restrict admin, int rel_row, int
column, _In_z_ _Printf_format_string_ const char *restrict format, ...)
+copy_report_error(struct error_handling *restrict admin, lng rel_row, int
column, _In_z_ _Printf_format_string_ const char *restrict format, ...)
{
va_list ap;
const char *col_name;
@@ -251,7 +251,7 @@ copy_report_error(struct error_handling
}
if (cnt) {
uint32_t *r = (uint32_t*)(admin->rows->tvheap->base +
sizeof(ccand_t));
- int w = rel_row%32;
+ int w = (int)(rel_row%32);
/* unset rel_row bit */
r[rel_row/32] &= ~(1<<w);
}
diff --git a/sql/backends/monet5/copy_scan.c b/sql/backends/monet5/copy_scan.c
--- a/sql/backends/monet5/copy_scan.c
+++ b/sql/backends/monet5/copy_scan.c
@@ -448,7 +448,7 @@ scan_fieldN(struct scan_state *state, un
static gdk_return
check_row_end(
struct error_handling *errors, struct scan_state *state,
- int row, int col, int ncols, unsigned char sep)
+ lng row, int col, int ncols, unsigned char sep)
{
if (col == ncols - 1) {
// Last column. Expect LINE_SEP or COL_SEP LINE_SEP
@@ -493,7 +493,7 @@ check_row_end(
str
scan_fields(
struct error_handling *errors, struct scan_state *state,
- unsigned char *null_repr, int null_repr_len, int ncols, int nrows, int
**columns)
+ unsigned char *null_repr, int null_repr_len, int ncols, lng nrows, int
**columns)
{
int row = 0;
int col = 0;
@@ -575,7 +575,7 @@ scan_fields(
str
scan_fields1(
struct error_handling *errors, struct scan_state *state,
- unsigned char *null_repr, int null_repr_len, int ncols, int nrows, int
**columns)
+ unsigned char *null_repr, int null_repr_len, int ncols, lng nrows, int
**columns)
{
int row = 0;
int col = 0;
@@ -657,7 +657,7 @@ scan_fields1(
str
scan_fieldsN( /* ie use col_sep_str */
struct error_handling *errors, struct scan_state *state,
- unsigned char *null_repr, int null_repr_len, int ncols, int nrows, int
**columns)
+ unsigned char *null_repr, int null_repr_len, int ncols, lng nrows, int
**columns)
{
int row = 0;
int col = 0;
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]