Changeset: a9441ee59482 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a9441ee59482 Modified Files: gdk/gdk_bbp.c sql/storage/bat/bat_logger.c Branch: linear-hashing Log Message:
Use actual array size for declaration of new array. diffs (33 lines): diff --git a/gdk/gdk_bbp.c b/gdk/gdk_bbp.c --- a/gdk/gdk_bbp.c +++ b/gdk/gdk_bbp.c @@ -1046,7 +1046,7 @@ BBPreadEntries(FILE *fp, unsigned bbpver uint64_t batid; uint16_t status; char headname[129]; - char filename[20]; + char filename[sizeof(BBP_physical(0))]; unsigned int properties; int nread, n; char *s, *options = NULL; @@ -1054,8 +1054,6 @@ BBPreadEntries(FILE *fp, unsigned bbpver uint64_t count, capacity, base = 0; int Thashash; - static_assert(sizeof(BBP_physical(0)) == sizeof(filename), - "filename should be same size as BBPrec.physical"); if ((s = strchr(buf, '\r')) != NULL) { /* convert \r\n into just \n */ if (s[1] != '\n') { diff --git a/sql/storage/bat/bat_logger.c b/sql/storage/bat/bat_logger.c --- a/sql/storage/bat/bat_logger.c +++ b/sql/storage/bat/bat_logger.c @@ -1087,7 +1087,7 @@ snapshot_bats(stream *plan, const char * uint64_t batid; uint64_t tail_free; uint64_t theap_free; - char filename[20]; + char filename[sizeof(BBP_physical(0))]; // The lines in BBP.dir come in various lengths. // we try to parse the longest variant then check // the return value of sscanf to see which fields _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list