MonetDB: transaction-replication - Silence compiler

Sjoerd Mullender sjoerd at monetdb.org
Mon Jul 21 09:23:36 CEST 2014


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 at monetdb.org
> https://www.monetdb.org/mailman/listinfo/checkin-list
> 


-- 
Sjoerd Mullender

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 356 bytes
Desc: OpenPGP digital signature
URL: <http://www.monetdb.org/pipermail/developers-list/attachments/20140721/d9b7c7f5/attachment.sig>


More information about the developers-list mailing list