richfitz / thor

:zap::computer::zap: R client for the Lightning Memory-Mapped Database

Home Page:https://richfitz.github.io/thor

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Compiler issues from CRAN

richfitz opened this issue · comments

Two issues:

on windows:

lmdb/mdb.c:1734:2: warning: array subscript is above array bounds [-Warray-bounds]
  FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM |
  ^

with gcc10:

/usr/local/gcc10/bin/gcc -I"/data/gannet/ripley/R/R-gcc10/include" -DNDEBUG   -I/usr/local/include  -Ilmdb -fpic  -g -O2 -Wall -pedantic -mtune=native -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong -fstack-clash-protection -fcf-protection  -c registration.c -o registration.o
In file included from /usr/include/string.h:494,
                 from lmdb/mdb.c:131:
In function 'memcpy',
    inlined from 'mdb_env_cwalk' at lmdb/mdb.c:10042:7:
/usr/include/bits/string_fortified.h:34:10: warning: writing 8 bytes into a region of size 1 [-Wstringop-overflow=]
   34 |   return __builtin___memcpy_chk (__dest, __src, __len, __bos0 (__dest));
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lmdb/mdb.c: In function 'mdb_env_cwalk':
lmdb/mdb.c:1078:8: note: at offset 0 to object 'mn_data' with size 1 declared here
 1078 |  char  mn_data[1];   /**< key and data are appended here */
      |        ^~~~~~~

Fixed in #15