Re: MonetDB: transaction-replication - Silence compiler
Not the right fix. __int64_t is not portable. In this case, since strings are never so long, a cast to (int) would have been good enough. You could also use ptrdiff_t which is the actual (standard C) type for the difference of pointers. On 2014-07-20 21:52, Dimitar Nedev wrote:
Changeset: 697c8e1dfbac for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=697c8e1dfbac Modified Files: gdk/gdk_storage.c Branch: transaction-replication Log Message:
Silence compiler Avoid conversion from int64 to int
diffs (21 lines):
diff --git a/gdk/gdk_storage.c b/gdk/gdk_storage.c --- a/gdk/gdk_storage.c +++ b/gdk/gdk_storage.c @@ -100,7 +100,7 @@ GDKfilepath(int farmid, const char *dir, char * GDKfilepath_long(int farmid, const char *dir, const char *ext) { char *last_dir_with_sep; - int last_dirsep_index; + __int64_t last_dirsep_index; char *last_dir; char *last_dir_parent;
@@ -258,7 +258,7 @@ GDKfileopen(int farmid, const char * dir /* if name is null, try to get one from dir (in case it was a path) */ if ((name == NULL) || (*name == 0)) { char *last_dir_with_sep; - int last_dirsep_index; + __int64_t last_dirsep_index; char *last_dir; char *last_dir_parent;
_______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
-- Sjoerd Mullender
I see. Fixed just now. http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=2d24c1aa6ad4
Thanks,
Dimitar
On 2014-Jul-21, at 09:23 , Sjoerd Mullender
Not the right fix. __int64_t is not portable. In this case, since strings are never so long, a cast to (int) would have been good enough. You could also use ptrdiff_t which is the actual (standard C) type for the difference of pointers.
On 2014-07-20 21:52, Dimitar Nedev wrote:
Changeset: 697c8e1dfbac for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=697c8e1dfbac Modified Files: gdk/gdk_storage.c Branch: transaction-replication Log Message:
Silence compiler Avoid conversion from int64 to int
diffs (21 lines):
diff --git a/gdk/gdk_storage.c b/gdk/gdk_storage.c --- a/gdk/gdk_storage.c +++ b/gdk/gdk_storage.c @@ -100,7 +100,7 @@ GDKfilepath(int farmid, const char *dir, char * GDKfilepath_long(int farmid, const char *dir, const char *ext) { char *last_dir_with_sep; - int last_dirsep_index; + __int64_t last_dirsep_index; char *last_dir; char *last_dir_parent;
@@ -258,7 +258,7 @@ GDKfileopen(int farmid, const char * dir /* if name is null, try to get one from dir (in case it was a path) */ if ((name == NULL) || (*name == 0)) { char *last_dir_with_sep; - int last_dirsep_index; + __int64_t last_dirsep_index; char *last_dir; char *last_dir_parent;
_______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
-- Sjoerd Mullender
_______________________________________________ developers-list mailing list developers-list@monetdb.org https://www.monetdb.org/mailman/listinfo/developers-list
participants (2)
-
Dimitar Nedev
-
Sjoerd Mullender