Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

snap-confine: fix incorrect use "src" var in mount-support.c #6336

Merged
merged 1 commit into from
Jan 9, 2019

Conversation

mvo5
Copy link
Contributor

@mvo5 mvo5 commented Jan 9, 2019

We got a bugreport from fedora that gcc-9 fails to build with current snapd:

snap-confine/mount-support.c: In function 'sc_bootstrap_mount_namespace':
snap-confine/mount-support.c:403:4: error: '%s' directive argument is null [-Werror=format-overflow=]
  403 |    die("cannot use result from readlink: %s", src);
      |    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[1]: *** [Makefile:2507: snap-confine/snap_confine_debug-mount-support.o] Error 1
make[1]: *** Waiting for unfinished jobs....

This PR fixes this issue. Thanks to Jeff Law for reporting the issue!

We got a bugreport from fedora that gcc-9 fails to build with
current snapd:
```
snap-confine/mount-support.c: In function 'sc_bootstrap_mount_namespace':
snap-confine/mount-support.c:403:4: error: '%s' directive argument is null [-Werror=format-overflow=]
  403 |    die("cannot use result from readlink: %s", src);
      |    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[1]: *** [Makefile:2507: snap-confine/snap_confine_debug-mount-support.o] Error 1
make[1]: *** Waiting for unfinished jobs....
```

This PR fixes this issue.
@mvo5 mvo5 added this to the 2.37 milestone Jan 9, 2019
Copy link
Contributor

@zyga zyga left a comment

Choose a reason for hiding this comment

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

+1, good catch

@mvo5 mvo5 merged commit b4cf961 into canonical:master Jan 9, 2019
mvo5 added a commit to mvo5/snappy that referenced this pull request Jan 31, 2019
snap-confine: fix incorrect use "src" var in mount-support.c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants