Skip to content

tpch_2_13_0/update_release.sh prompts warnings while building #184

@onurctirtir

Description

@onurctirtir

We get mostly int/long int gcc warnings (and more) from update_release.sh when using the script in jdbc tests (https://github.com/citusdata/test-automation/tree/jdbc).

We should investigate the problem a bit closer, maybe we can update the tpch version or fix the way that script triggers the build

./update_release.sh 2 13 0
gcc -g -DDBNAME=\"dss\" -DLINUX -DORACLE -DTPCH -DRNG_TEST -D_FILE_OFFSET_BITS=64    -c -o build.o build.c 
In file included from build.c:45:0: 
build.c: In functionmk_time’: 
dss.h:487:14: warning: format ‘%dexpects argument of typeint’, but argument 3 has typelong int’ [-Wformat=] 
 sprintf(tgt, "19%02d-%02d-%02d", yr, mn, dy) 
              ^ 
build.c:424:2: note: in expansion of macroPR_DATEPR_DATE(t->alpha, y, m, 
  ^ 
dss.h:487:14: warning: format ‘%dexpects argument of typeint’, but argument 4 has type ‘long int’ [-Wformat=] 
 sprintf(tgt, "19%02d-%02d-%02d", yr, mn, dy) 
              ^ 
build.c:424:2: note: in expansion of macroPR_DATEPR_DATE(t->alpha, y, m, 
  ^ 
dss.h:487:14: warning: format ‘%dexpects argument of typeint’, but argument 5 has type ‘long int’ [-Wformat=] 
 sprintf(tgt, "19%02d-%02d-%02d", yr, mn, dy) 
              ^ 
build.c:424:2: note: in expansion of macroPR_DATEPR_DATE(t->alpha, y, m, 
  ^ 
gcc -g -DDBNAME=\"dss\" -DLINUX -DORACLE -DTPCH -DRNG_TEST -D_FILE_OFFSET_BITS=64    -c -o driver.o driver. 
driver.c: In functiongen_tbl’: 
driver.c:368:11: warning: format ‘%ldexpects argument of type ‘long int’, but argument 3 has type ‘long long int’ [-Wformat=] 
    printf("\nSeeds for %s at rowcount %ld\n", tdefs[tnum].comment, i); 
           ^ 
driver.c: In functionpartial’: 
driver.c:428:20: warning: format ‘%dexpects argument of typeint’, but argument 4 has type ‘long int’ [-Wformat=] 
   fprintf (stderr, "\tStarting to load stage %d of %d for %s...", 
                    ^ 
driver.c: In functionmain’: 
driver.c:754:5: warning: format ‘%dexpects argument of typeint’, but argument 3 has type ‘long int’ [-Wformat=] 
     "Generating update pair #%d for %s", 
     ^ 
gcc -g -DDBNAME=\"dss\" -DLINUX -DORACLE -DTPCH -DRNG_TEST -D_FILE_OFFSET_BITS=64    -c -o bm_utils.o bm_utils.c 
gcc -g -DDBNAME=\"dss\" -DLINUX -DORACLE -DTPCH -DRNG_TEST -D_FILE_OFFSET_BITS=64    -c -o rnd.o rnd.c 
rnd.c: In functionrow_stop’: 
rnd.c:131:21: warning: format ‘%dexpects argument of typeint’, but argument 4 has type ‘long long int’ [-Wformat=] 
     fprintf(stderr, "\nSEED CHANGE: seed[%d].usage = %d\n", 
                     ^ 
rnd.c: In functiondump_seeds’: 
rnd.c:154:11: warning: format ‘%ldexpects argument of type ‘long int’, but argument 3 has type ‘long long int’ [-Wformat=] 
    printf("%d(%ld):\t%ld\n", i, Seed[i].nCalls, Seed[i].value); 
           ^ 
rnd.c:154:11: warning: format ‘%ldexpects argument of type ‘long int’, but argument 4 has type ‘long long int’ [-Wformat=] 
gcc -g -DDBNAME=\"dss\" -DLINUX -DORACLE -DTPCH -DRNG_TEST -D_FILE_OFFSET_BITS=64    -c -o print.o print.c 
print.c: In functiondbg_print’: 
print.c:138:19: warning: format ‘%ldexpects argument of type ‘long int’, but argument 3 has typeint’ [-Wformat=] 
   fprintf(target, "%ld.%02ld", dollars, cents); 
                   ^ 
print.c:138:19: warning: format ‘%ldexpects argument of type ‘long int’, but argument 4 has typeint’ [-Wformat=] 
gcc -g -DDBNAME=\"dss\" -DLINUX -DORACLE -DTPCH -DRNG_TEST -D_FILE_OFFSET_BITS=64    -c -o load_stub.o load_stub.c 
gcc -g -DDBNAME=\"dss\" -DLINUX -DORACLE -DTPCH -DRNG_TEST -D_FILE_OFFSET_BITS=64    -c -o bcd2.o bcd2.c 
gcc -g -DDBNAME=\"dss\" -DLINUX -DORACLE -DTPCH -DRNG_TEST -D_FILE_OFFSET_BITS=64    -c -o speed_seed.o speed_seed.c 
gcc -g -DDBNAME=\"dss\" -DLINUX -DORACLE -DTPCH -DRNG_TEST -D_FILE_OFFSET_BITS=64    -c -o text.o text.c 
gcc -g -DDBNAME=\"dss\" -DLINUX -DORACLE -DTPCH -DRNG_TEST -D_FILE_OFFSET_BITS=64    -c -o permute.o perute.c 
gcc -g -DDBNAME=\"dss\" -DLINUX -DORACLE -DTPCH -DRNG_TEST -D_FILE_OFFSET_BITS=64    -c -o rng64.o rng64.c 
gcc -g -DDBNAME=\"dss\" -DLINUX -DORACLE -DTPCH -DRNG_TEST -D_FILE_OFFSET_BITS=64  -O -o dbgen build.o driver.o bm_utils.o rnd.o print.o load_stub.o bcd2.o speed_seed.o text.o permute.o rng64.o -lm 
gcc -g -DDBNAME=\"dss\" -DLINUX -DORACLE -DTPCH -DRNG_TEST -D_FILE_OFFSET_BITS=64    -c -o qgen.o qgen.c 
In file included from qgen.c:41:0: 
qgen.c: In functionqsub’: 
tpcd.h:76:19: warning: zero-length gnu_printf format string [-Wformat-zero-length] 
 #define SET_DBASE "" 
                   ^ 
qgen.c:197:38: note: in expansion of macroSET_DBASEfprintf(ofp, SET_DBASE, db_name); 
                                      ^ 
qgen.c: In functionmain’: 
qgen.c:456:32: warning: format ‘%dexpects argument of typeint’, but argument 3 has type ‘long int’ [-Wformat=] 
                 sprintf(qname, "%d", SEQUENCE(snum, atoi(av[i]))); 
                                ^ 
qgen.c:463:32: warning: format ‘%dexpects argument of typeint’, but argument 3 has type ‘long int’ [-Wformat=] 
                 sprintf(qname, "%d", SEQUENCE(snum, i)); 
                                ^

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions