Skip to content

-Wformat clang/gcc warnings #5768

@jangorecki

Description

@jangorecki

New compilation warnings on CRAN
https://www.r-project.org/nosvn/R.check/r-devel-linux-x86_64-fedora-clang/data.table-00check.html
Same warnings, but less, on GCC

checking whether package ‘data.table’ can be installed ... [57s/138s] WARNING
Found the following significant warnings:
  assign.c:470:83: warning: format specifies type 'int' but the argument has type 'R_xlen_t' (aka 'long') [-Wformat]
  assign.c:518:22: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
  assign.c:794:96: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
  forder.c:107:30: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
  forder.c:121:19: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
  forder.c:255:27: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
  forder.c:270:23: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
  forder.c:272:21: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
  forder.c:283:18: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
  forder.c:284:23: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
  forder.c:304:25: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
  forder.c:322:17: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
  forder.c:340:14: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
  forder.c:404:3: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
  forder.c:426:7: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
  forder.c:428:7: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
  forder.c:430:7: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
  forder.c:443:5: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
  forder.c:445:5: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
  forder.c:447:5: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
  forder.c:453:7: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
  forder.c:455:7: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
  forder.c:459:5: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
  forder.c:462:5: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
  forder.c:465:5: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
  forder.c:467:5: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
  forder.c:495:5: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
  forder.c:511:9: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
  forder.c:553:7: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
  forder.c:599:11: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
  forder.c:706:8: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
  forder.c:720:47: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
  forder.c:725:57: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
  forder.c:1045:36: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
  forder.c:1154:15: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
  forder.c:1261:38: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
  forder.c:1265:57: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
  forder.c:1270:29: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
  forder.c:1302:7: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
  forder.c:1315:29: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
  forder.c:1332:7: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
  forder.c:1366:9: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
  fread.c:1888:54: warning: format specifies type 'int' but the argument has type 'int64_t' (aka 'long') [-Wformat]
  fsort.c:168:102: warning: format specifies type 'int' but the argument has type 'size_t' (aka 'unsigned long') [-Wformat]
  fsort.c:245:49: warning: format specifies type 'int' but the argument has type 'size_t' (aka 'unsigned long') [-Wformat]
  fsort.c:249:54: warning: format specifies type 'int' but the argument has type 'size_t' (aka 'unsigned long') [-Wformat]
  fwrite.c:626:28: warning: format specifies type 'int' but the argument has type 'const void *' [-Wformat]
  fwrite.c:711:68: warning: format specifies type 'int' but the argument has type 'size_t' (aka 'unsigned long') [-Wformat]
  fwrite.c:731:15: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
  fwrite.c:746:64: warning: format specifies type 'int' but the argument has type 'size_t' (aka 'unsigned long') [-Wformat]
  fwrite.c:814:10: warning: format specifies type 'int' but the argument has type 'size_t' (aka 'unsigned long') [-Wformat]
  fwrite.c:825:10: warning: format specifies type 'int' but the argument has type 'size_t' (aka 'unsigned long') [-Wformat]
  fwrite.c:915:21: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
  gsumm.c:90:38: warning: format specifies type 'int' but the argument has type 'size_t' (aka 'unsigned long') [-Wformat]
  gsumm.c:90:48: warning: format specifies type 'int' but the argument has type 'size_t' (aka 'unsigned long') [-Wformat]
  gsumm.c:90:56: warning: format specifies type 'int' but the argument has type 'size_t' (aka 'unsigned long') [-Wformat]
  gsumm.c:90:67: warning: format specifies type 'int' but the argument has type 'size_t' (aka 'unsigned long') [-Wformat]
  gsumm.c:609:90: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
  gsumm.c:612:93: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
  gsumm.c:638:92: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
  gsumm.c:1411:72: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
  ijoin.c:323:89: warning: data argument not used by format string [-Wformat-extra-args]
  init.c:153:139: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
  init.c:168:71: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
  init.c:169:77: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
  init.c:171:83: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
  init.c:172:106: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
  init.c:173:105: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
  init.c:173:119: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
  init.c:174:81: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
  init.c:175:79: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
  init.c:176:87: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
  init.c:177:77: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
  init.c:178:79: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
  init.c:179:79: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
  init.c:180:81: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
  init.c:184:95: warning: format specifies type 'int' but the argument has type 'R_xlen_t' (aka 'long') [-Wformat]
  rbindlist.c:212:37: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
  rbindlist.c:233:50: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
  rbindlist.c:234:48: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
  rbindlist.c:494:31: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
  reorder.c:17:115: warning: format specifies type 'int' but the argument has type 'size_t' (aka 'unsigned long') [-Wformat]
  reorder.c:27:136: warning: format specifies type 'int' but the argument has type 'size_t' (aka 'unsigned long') [-Wformat]
  snprintf.c:217:136: warning: format specifies type 'char *' but the argument has type 'int' [-Wformat]
  subset.c:270:26: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
See the [install log](https://www.r-project.org/nosvn/R.check/r-devel-linux-x86_64-fedora-clang/data.table-00install.html) for details.
used C compiler: ‘clang version 17.0.5’

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions