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

Add missing cassert include #17196

Merged
merged 1 commit into from
Jan 15, 2020
Merged

Add missing cassert include #17196

merged 1 commit into from
Jan 15, 2020

Conversation

candrews
Copy link
Contributor

Without this include, ‘assert’ was not declared in this scope errors occur.

This issue was introduced by #17182

Description

FAILED: build/platform/linux/peripherals/CMakeFiles/platform_linux_peripherals.dir/PeripheralBusUSBLibUdev.cpp.o 
/usr/lib/ccache/bin/x86_64-pc-linux-gnu-g++  -I/var/tmp/portage/media-tv/kodi-9999/work/kodi-9999 -I/var/tmp/portage/media-tv/kodi-9999/work/kodi-9999/lib -I/var/tmp/portage/media-tv/kodi-9999/work/kodi-9999/lib/gtest/include -I/var/tmp/p
ortage/media-tv/kodi-9999/work/kodi-9999/xbmc -I/var/tmp/portage/media-tv/kodi-9999/work/kodi-9999/xbmc/platform/linux -I/var/tmp/portage/media-tv/kodi-9999/work/kodi-9999/xbmc/cores/VideoPlayer -Ibuild -I/var/tmp/portage/media-tv/kodi-99
99/work/kodi-9999/xbmc/platform/posix -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -I/usr/include/python3.7m -I/usr/include/libxml2 -Ibuild/cores/RetroPlayer/messages -I/usr/include/freetype2 -I/usr/include/fribidi -Ibuild/libdvd
/include -I/usr/include/lzo -I/usr/include/libdrm  -DNDEBUG -O2 -march=native -pipe -fuse-linker-plugin -flto -Wl,-flto -ftree-vectorize -ftree-slp-vectorize -falign-functions=32 -fgraphite-identity -floop-nest-optimize -fno-lto -fno-use-
linker-plugin -ggdb -DPLATFORM_SETTINGS_FILE=x11.xml -Wall   -DTARGET_POSIX -DTARGET_LINUX -D_GNU_SOURCE -DHAVE_LINUX_MEMFD=1 -DHAVE_MKOSTEMP=1 -DHAVE_SSE=1 -DHAVE_SSE2=1 -DHAVE_SSE3=1 -DHAVE_SSSE3=1 -DHAVE_SSE4_1=1 -D__STDC_CONSTANT_MACR
OS -D_FILE_OFFSET_BITS=64 -DHAS_LINUX_NETWORK -DHAS_BUILTIN_SYNC_ADD_AND_FETCH=1 -DHAS_BUILTIN_SYNC_SUB_AND_FETCH=1 -DHAS_BUILTIN_SYNC_VAL_COMPARE_AND_SWAP=1 -DHAVE_INOTIFY=1 -DHAVE_POSIX_FADVISE=1 -DHAVE_LOCALTIME_R=1 -DHAVE_GMTIME_R=1 -
DHAVE_INTTYPES_H=1 -DHAS_ALSA=1 -DHAS_AVAHI=1 -DHAS_ZEROCONF=1 -DHAVE_LIBBLURAY=1 -DHAVE_LIBBLURAY_BDJ=1 -DHAVE_LIBCEC=1 -DHAS_DBUS=1 -DHAVE_LCMS2=1 -DHAS_WEB_SERVER=1 -DHAS_WEB_INTERFACE=1 -DHAS_PULSEAUDIO=1 -DHAS_PYTHON=1 -DHAVE_LIBUDEV
=1 -DHAVE_LIBXSLT=1 -DHAVE_LIBVA=1 -DHAS_GLX=1 -DFFMPEG_VER_SHA=\"undef\" -I/usr/include/fribidi -DHAS_EGL=1 -DHAVE_X11=1 -DHAVE_LIBXRANDR=1 -DHAS_GL=1 -DHAS_UPNP=1 -DHAS_DVD_DRIVE -DHAS_CDDA_RIPPER -DBIN_INSTALL_PATH=\"/usr/lib64/kodi\" 
-DINSTALL_PATH=\"/usr/share/kodi\" -std=c++14 -MD -MT build/platform/linux/peripherals/CMakeFiles/platform_linux_peripherals.dir/PeripheralBusUSBLibUdev.cpp.o -MF build/platform/linux/peripherals/CMakeFiles/platform_linux_peripherals.dir/
PeripheralBusUSBLibUdev.cpp.o.d -o build/platform/linux/peripherals/CMakeFiles/platform_linux_peripherals.dir/PeripheralBusUSBLibUdev.cpp.o -c /var/tmp/portage/media-tv/kodi-9999/work/kodi-9999/xbmc/platform/linux/peripherals/PeripheralBu
sUSBLibUdev.cpp
/var/tmp/portage/media-tv/kodi-9999/work/kodi-9999/xbmc/platform/linux/peripherals/PeripheralBusUSBLibUdev.cpp: In member function ‘virtual bool PERIPHERALS::CPeripheralBusUSB::PerformDeviceScan(PERIPHERALS::PeripheralScanResults&)’:
/var/tmp/portage/media-tv/kodi-9999/work/kodi-9999/xbmc/platform/linux/peripherals/PeripheralBusUSBLibUdev.cpp:85:3: error: ‘assert’ was not declared in this scope
   85 |   assert(IsCurrentThread());
      |   ^~~~~~
/var/tmp/portage/media-tv/kodi-9999/work/kodi-9999/xbmc/platform/linux/peripherals/PeripheralBusUSBLibUdev.cpp:16:1: note: ‘assert’ is defined in header ‘<cassert>’; did you forget to ‘#include <cassert>’?
   15 | #include "utils/log.h"
  +++ |+#include <cassert>
   16 | 

Motivation and Context

Fix compilation error :)

How Has This Been Tested?

Tested on my system.

Screenshots (if appropriate):

n/a

Types of change

  • Bug fix (non-breaking change which fixes an issue)
  • Clean up (non-breaking change which removes non-working, unmaintained functionality)
  • Improvement (non-breaking change which improves existing functionality)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that will cause existing functionality to change)
  • Cosmetic change (non-breaking change that doesn't touch code)
  • None of the above (please explain below)

Checklist:

  • My code follows the Code Guidelines of this project
  • My change requires a change to the documentation, either Doxygen or wiki
  • I have updated the documentation accordingly
  • I have read the Contributing document
  • I have added tests to cover my change
  • All new and existing tests passed

Without this include, ‘assert’ was not declared in this scope errors occur.
@candrews candrews requested a review from lrusak as a code owner January 15, 2020 14:49
@lrusak lrusak added Type: Fix non-breaking change which fixes an issue v19 Matrix labels Jan 15, 2020
@lrusak lrusak added this to the Matrix 19.0-alpha 1 milestone Jan 15, 2020
Copy link
Contributor

@lrusak lrusak left a comment

Choose a reason for hiding this comment

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

fine by me if jenkins is happy

@lrusak
Copy link
Contributor

lrusak commented Jan 15, 2020

build failures unrelated

@lrusak lrusak merged commit f4f9d88 into xbmc:master Jan 15, 2020
Maven85 pushed a commit to Maven85/kodi that referenced this pull request Jan 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Fix non-breaking change which fixes an issue v19 Matrix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants