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

Werror issue on fedora #870

Closed
kwizart opened this issue Mar 9, 2020 · 2 comments · Fixed by #885
Closed

Werror issue on fedora #870

kwizart opened this issue Mar 9, 2020 · 2 comments · Fixed by #885

Comments

@kwizart
Copy link

kwizart commented Mar 9, 2020

Here a Warning turned into when building on fedora.

CMakeFiles/iHD_drv_video_OBJ.dir/linux/common/os/i915/xf86drm.c.o -c /builddir/build/BUILD/media-driver-intel-media-19.4.0/media_driver/linux/common/os/i915/xf86drm.c
/builddir/build/BUILD/media-driver-intel-media-19.4.0/media_driver/linux/common/os/i915/xf86drm.c: In function 'int drmOpenByBusid(const char*, int)':
/builddir/build/BUILD/media-driver-intel-media-19.4.0/media_driver/linux/common/os/i915/xf86drm.c:606:15: error: '%s' directive argument is null [-Werror=format-overflow=]
606 | drmMsg("drmOpenByBusid: drmGetBusid reports %s\n", buf);
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors

@dvrogozh
Copy link
Contributor

dvrogozh commented Mar 9, 2020

We did not see this one building with gcc-9.2.1. Are you using gcc-10 which is under development? (I think I saw that in your logs)

@dvrogozh
Copy link
Contributor

w/ self built gcc-10 (head of gcc tree) I see this:

/opt/intel/git/media-driver/media_driver/linux/ult/libdrm_mock/xf86drm_mock.c: In function 'int drmOpenByBusid(const char*, int)':
/opt/intel/git/media-driver/media_driver/linux/ult/libdrm_mock/xf86drm_mock.c:815:15: warning: '%s' directive argument is null [-Wformat-overflow=]
  815 |         drmMsg("drmOpenByBusid: drmGetBusid reports %s\n", buf);
      |         ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...
/opt/intel/git/media-driver/media_driver/linux/common/os/i915/xf86drm.c: In function 'int drmOpenByBusid(const char*, int)':
/opt/intel/git/media-driver/media_driver/linux/common/os/i915/xf86drm.c:606:15: error: '%s' directive argument is null [-Werror=format-overflow=]
  606 |         drmMsg("drmOpenByBusid: drmGetBusid reports %s\n", buf);
      |         ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

dvrogozh added a commit to dvrogozh/media-driver that referenced this issue Mar 20, 2020
Fixes: intel#870

With upcoming gcc-10 we start to see Werror=format-overflow reporting
that we attempt to printf %s null strings.

Change-Id: I7a62bc98bf7dd6bcd61d475d7650a06aa1a70932
Signed-off-by: Dmitry Rogozhkin <dmitry.v.rogozhkin@intel.com>
intel-mediadev pushed a commit that referenced this issue Mar 25, 2020
Fixes: #870

With upcoming gcc-10 we start to see Werror=format-overflow reporting
that we attempt to printf %s null strings.

Change-Id: I7a62bc98bf7dd6bcd61d475d7650a06aa1a70932
Signed-off-by: Dmitry Rogozhkin <dmitry.v.rogozhkin@intel.com>
Sherry-Lin pushed a commit that referenced this issue Apr 8, 2020
Fixes: #870

With upcoming gcc-10 we start to see Werror=format-overflow reporting
that we attempt to printf %s null strings.

Change-Id: I7a62bc98bf7dd6bcd61d475d7650a06aa1a70932
Signed-off-by: Dmitry Rogozhkin <dmitry.v.rogozhkin@intel.com>
ykku16github pushed a commit to ykku16github/media-driver that referenced this issue Apr 16, 2020
Fixes: intel#870

With upcoming gcc-10 we start to see Werror=format-overflow reporting
that we attempt to printf %s null strings.

Change-Id: I7a62bc98bf7dd6bcd61d475d7650a06aa1a70932
Signed-off-by: Dmitry Rogozhkin <dmitry.v.rogozhkin@intel.com>
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 a pull request may close this issue.

2 participants