Skip to content

pkg/relic: Fix warning caused by -Wsizeof-pointer-memaccess.#9241

Closed
jcarrano wants to merge 1 commit intoRIOT-OS:masterfrom
jcarrano:fix-relic-strncpy-warning
Closed

pkg/relic: Fix warning caused by -Wsizeof-pointer-memaccess.#9241
jcarrano wants to merge 1 commit intoRIOT-OS:masterfrom
jcarrano:fix-relic-strncpy-warning

Conversation

@jcarrano
Copy link
Copy Markdown
Contributor

@jcarrano jcarrano commented May 30, 2018

The fix has already been PR'd upstream. In the meanwhile, we need to be able to keep on compiling. The PR has been merged

Contribution description

GCC's -Wsizeof-pointer-memaccess (activated by -Wall) checks calls of the form

strncpy(dest, src, sizeof(X))

And emits a warning if X does not seem to make sense. In Relic, src = X= a constant string and this triggers gcc's warning, which gets converted into an error.

I'm using GCC 8.1.0.

Issues/PRs references

Upstream pr: relic-toolkit/relic#78

The fix has already been PR'd upstream. In the meanwhile, we need to be able to
keep on compiling.
@bergzand bergzand added Area: pkg Area: External package ports CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) labels May 30, 2018
@jcarrano
Copy link
Copy Markdown
Contributor Author

jcarrano commented May 31, 2018

The fix got merged upstream. Should I instead update relic's version?

@jnohlgard
Copy link
Copy Markdown
Member

IMO it's better to use a corrected upstream than to maintain our own patch set, but I don't know anything about the relic package.

@tcschmidt tcschmidt requested a review from tfar May 31, 2018 17:23
@tcschmidt
Copy link
Copy Markdown
Member

ping @tfar

@tfar
Copy link
Copy Markdown
Contributor

tfar commented Jun 11, 2018

Ah...forgot about this. Will take a look at this today.

@tcschmidt
Copy link
Copy Markdown
Member

ping @tfar

Copy link
Copy Markdown
Contributor

@tfar tfar left a comment

Choose a reason for hiding this comment

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

I'm in the process of changing the package to use RELIC upstream instead. This code change is already included upstream so we wouldn't need this anymore. As soon as #6965 is merged, this PR can be closed.

@cgundogan
Copy link
Copy Markdown
Member

@jcarrano since #6965 is merged, can we close this PR?

@tcschmidt
Copy link
Copy Markdown
Member

ping @jcarrano - ready to close?

@jcarrano
Copy link
Copy Markdown
Contributor Author

Closing, my patch is already merged upstream, and riot is using latest upstream.

@jcarrano jcarrano closed this Jun 21, 2018
@jcarrano jcarrano deleted the fix-relic-strncpy-warning branch November 8, 2018 15:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: pkg Area: External package ports CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants