#5 Fix GCC8 break
Closed a year ago by jmoyer. Opened 5 years ago by leitao.
https://github.com/leitao/libaio.git pr3  into  master

harness: Fix strncpy argument
Breno Leitao • 5 years ago  
harness/cases/19.t
file modified
+1 -1
@@ -41,7 +41,7 @@

  	int fd;

  	char template[sizeof(TEMPLATE)];

  

- 	strncpy(template, TEMPLATE, sizeof(TEMPLATE));

+ 	strncpy(template, TEMPLATE, sizeof(template));

  	fd = mkostemp(template, O_DIRECT);

  	if (fd < 0) {

  		perror("mkstemp");

harness/cases/21.t
file modified
+1 -1
@@ -43,7 +43,7 @@

  	int fd;

  	char temp_file[sizeof(TEMPLATE)];

  

- 	strncpy(temp_file, TEMPLATE, sizeof(TEMPLATE));

+ 	strncpy(temp_file, TEMPLATE, sizeof(temp_file));

  	fd = mkstemp(temp_file);

  	if (fd < 0) {

  		perror("mkstemp");

no initial comment

What's the build failure?

This isn't actually a bug in the code, by the way. If I do pull this in, it will be with a commit message that explains that the change is solely to work around a gcc issue.

Hi Jeffrey,

This is a extra warning/error that GCC8 included in their default
configuration.

On Mon, Oct 22, 2018 at 3:56 PM Jeffrey E. Moyer pagure@pagure.io wrote:

jmoyer commented on the pull-request: Fix GCC8 break that you are
following:
``
What's the build failure?

This isn't actually a bug in the code, by the way. If I do pull this in,
it will be with a commit message that explains that the change is solely to
work around a gcc issue.
``

To reply, visit the link below or just reply to this email
https://pagure.io/libaio/pull-request/5

This was fixed with commit b9e17f6. It can be closed now.

Pull-Request has been closed by jmoyer

a year ago
Metadata