Fix warnings on x86_64
[tedtools.git] / flatdbtest.c
index ec6fb69..383d81e 100644 (file)
@@ -89,7 +89,7 @@ main(int argn, char *argv[]) {
                                        tlog(TL_CRIT|TL_EXIT, "FDBPut failed: %d", rc);
                                }
                                tfree(record);
-                               printf("Put: off:%d len:%d '%s'\n", (int)offset, len-RECHDRSZ, optarg);
+                               printf("Put: off:%d len:%d '%s'\n", (int)offset, (int)(len-RECHDRSZ), optarg);
                                break;
                        case 'g': 
                                if (!isopened) {usage();}
@@ -98,7 +98,7 @@ main(int argn, char *argv[]) {
                                        FDBClose(&db);
                                        tlog(TL_CRIT|TL_EXIT, "FDBGet failed: %d", rc);
                                }
-                               printf("Get: off:%d len:%d '", (int)offset, record->length - RECHDRSZ);
+                               printf("Get: off:%d len:%d '", (int)offset, (int)(record->length - RECHDRSZ));
                                fwrite(record->data, record->length - RECHDRSZ, 1, stdout);
                                puts("'");
                                tfree(record);
@@ -117,7 +117,7 @@ main(int argn, char *argv[]) {
                                if ( db.listcur ) { 
                                puts("List of free space:");
                                        for(i=0;i<db.listcur;i++)
-                                               printf("\toff: %d\t len: %d\n", (int)(db.space[i].offset), db.space[i].length);
+                                               printf("\toff: %d\t len: %d\n", (int)(db.space[i].offset), (int)(db.space[i].length));
                                } else
                                         puts("List of free space is void");
                                break;