eyalroz / tpch-dbgen

Data & query generation utilities for the TPC-H benchmark (unified repository)

Home Page:http://www.tpc.org/tpch/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Address GCC 7.x and 8.x compiler warnings

eyalroz opened this issue · comments

GCC 7.x and 8.x added several more warnings about the code they see, and ours triggers some of those, of the following kinds:

warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result]
warning: "%whatever" directive writing up to X bytes into a region of size Y [-Wformat-overflow=]

and another warning mwhich may or may not be GCC-8-related:

warning: 'strncpy' output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation]

Let's double-check the relevant code is ok, then make sure we don't hit the warning.