]> git.sesse.net Git - mlt/commitdiff
Fix some compile warnings about string-formatting 64bit.
authorDan Dennedy <dan@dennedy.org>
Thu, 21 Apr 2011 20:32:51 +0000 (13:32 -0700)
committerDan Dennedy <dan@dennedy.org>
Thu, 21 Apr 2011 20:32:51 +0000 (13:32 -0700)
src/framework/mlt_property.c
src/framework/mlt_types.h
src/modules/linsys/sdi_generator.c

index 7334e97576d321250dde0c3ee3f8023fe82b24d1..aea00e72bdfda1766bb66a114cb827b88ac04542 100644 (file)
@@ -421,13 +421,13 @@ char *mlt_property_get_string( mlt_property self )
                {
                        self->types |= mlt_prop_string;
                        self->prop_string = malloc( 32 );
-                       sprintf( self->prop_string, "%d", (int)self->prop_position ); /* I don't know if self is wanted. -Zach */
+                       sprintf( self->prop_string, "%d", (int)self->prop_position );
                }
                else if ( self->types & mlt_prop_int64 )
                {
                        self->types |= mlt_prop_string;
                        self->prop_string = malloc( 32 );
-                        sprintf( self->prop_string, "%lld", (long long int)self->prop_int64 );
+                       sprintf( self->prop_string, "%"PRId64, self->prop_int64 );
                }
                else if ( self->types & mlt_prop_data && self->serialiser != NULL )
                {
index 62f4ca3cf11aae7ee8308f24f9ef5b5de653167f..c0ac07c0bea28cde80bf9dfc19340a6da37b315f 100644 (file)
@@ -27,7 +27,7 @@
 #define GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
 #endif
 
-#include <stdint.h>
+#include <inttypes.h>
 
 #include "mlt_pool.h"
 
index 91af1a486a8ee5e6b9d2af2a4ff4a2bb039d0541..f05460054e8a683141f1164db11a62f95b587600 100644 (file)
@@ -2352,7 +2352,7 @@ static char * itoa(uint64_t i) {
                return strdup("0");
 
        char * mystring = (char *) malloc(50);
-       sprintf(mystring, "%llui", i);
+       sprintf(mystring, "%"PRIu64, i);
 
        return mystring;
 }