Comment 24 for bug 1905159

Revision history for this message
Jerzy Tarasiuk (tarasiukj) wrote :

modules/database/src/std/rec/biRecord.c
  argument to 'sizeof' in 'strncpy' call is the same
  expression as the source; did you mean to use the size
  of the destination? [-Wsizeof-pointer-memaccess]
  line:char 184:42 187:42 201:43 203:43 331:42 334:42

A sizeof znam/onam field size is used as the size limit
for strncpy; GCC suspects it to be a mistake and warns.
Unfortunately, the size is specified as a number in
biRecord.h - a fix should change the generator to use
a name and #define the name, and then use the name
instead the sizeof (using a number in the biRecord.c
would remove the warning, but the code would become
wrong without a warning if the size was changed later).