Skip to content

darshan-util: remove return(-1) from void function#18504

Merged
adamjstewart merged 3 commits intospack:developfrom
ketsubouchi:bugfix/darshan-util
Sep 10, 2020
Merged

darshan-util: remove return(-1) from void function#18504
adamjstewart merged 3 commits intospack:developfrom
ketsubouchi:bugfix/darshan-util

Conversation

@ketsubouchi
Copy link
Copy Markdown
Contributor

void darshan_log_get_name_records(darshan_fd fd,
struct darshan_name_record_info *name_records,
int
count)
{
...
if(ret < 0)
{
darshan_log_close(fd);
return(-1);
}

return(-1); in void function causes error in Fujitsu C compiler.
So I fixed to return; .

Copy link
Copy Markdown
Member

@adamjstewart adamjstewart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Has this patch been submitted upstream? @shanedsnyder @carns can you review this?

@ketsubouchi
Copy link
Copy Markdown
Contributor Author

ketsubouchi commented Sep 7, 2020

This bug is already fixed in latest code. So upstream is not needed.
https://xgitlab.cels.anl.gov/darshan/darshan/-/blob/master/darshan-util/darshan-logutils.c
See line 2109 (in darshan_log_get_name_records)

depends_on('zlib')
depends_on('bzip2', when="+bzip2", type=("build", "link", "run"))

patch('retvoid.patch')
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In that case you want something like this:

Suggested change
patch('retvoid.patch')
patch('retvoid.patch', when='@:3.2.1')

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your kind suggestion.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sounds good to me, especially with the version qualifier on the patch.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This return value bug should only affect versions 3.2.0 and 3.2.1, and we'll have it fixed in the next release. So, probably just when='@3.2.0:3.2.1' -- I imagine the patch would fail on previous versions.

Otherwise, looks good to me! Thanks!

@adamjstewart adamjstewart merged commit b014ffc into spack:develop Sep 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants