diff options
author | Francisco Jerez <[email protected]> | 2014-10-08 17:29:14 +0300 |
---|---|---|
committer | Francisco Jerez <[email protected]> | 2014-10-11 12:44:09 +0300 |
commit | 27c51b5f5864cdb69f587ff4b2ede1f69db57849 (patch) | |
tree | 3bc169571391d104dd272fa81a1f05bd67ed1071 | |
parent | 5480d6b13f1c2748a24b5d0033653cd41d7b1c97 (diff) |
clover: Use unreachable() from util/macros.h instead of assert(0).
Reviewed-by: Francisco Jerez <[email protected]>
-rw-r--r-- | src/gallium/state_trackers/clover/Makefile.am | 1 | ||||
-rw-r--r-- | src/gallium/state_trackers/clover/core/device.cpp | 6 | ||||
-rw-r--r-- | src/gallium/state_trackers/clover/core/object.hpp | 1 |
3 files changed, 4 insertions, 4 deletions
diff --git a/src/gallium/state_trackers/clover/Makefile.am b/src/gallium/state_trackers/clover/Makefile.am index cb1e9c292ac..62c13fa1e54 100644 --- a/src/gallium/state_trackers/clover/Makefile.am +++ b/src/gallium/state_trackers/clover/Makefile.am @@ -6,6 +6,7 @@ AM_CPPFLAGS = \ $(GALLIUM_PIPE_LOADER_DEFINES) \ -DPIPE_SEARCH_DIR=\"$(libdir)/gallium-pipe\" \ -I$(top_srcdir)/include \ + -I$(top_srcdir)/src \ -I$(top_srcdir)/src/gallium/include \ -I$(top_srcdir)/src/gallium/drivers \ -I$(top_srcdir)/src/gallium/auxiliary \ diff --git a/src/gallium/state_trackers/clover/core/device.cpp b/src/gallium/state_trackers/clover/core/device.cpp index 12c9584854b..688a7dd0893 100644 --- a/src/gallium/state_trackers/clover/core/device.cpp +++ b/src/gallium/state_trackers/clover/core/device.cpp @@ -70,8 +70,7 @@ device::type() const { case PIPE_LOADER_DEVICE_PLATFORM: return CL_DEVICE_TYPE_GPU; default: - assert(0); - return 0; + unreachable("Unknown device type."); } } @@ -84,8 +83,7 @@ device::vendor_id() const { case PIPE_LOADER_DEVICE_PCI: return ldev->u.pci.vendor_id; default: - assert(0); - return 0; + unreachable("Unknown device type."); } } diff --git a/src/gallium/state_trackers/clover/core/object.hpp b/src/gallium/state_trackers/clover/core/object.hpp index 697565c807a..daad06848b4 100644 --- a/src/gallium/state_trackers/clover/core/object.hpp +++ b/src/gallium/state_trackers/clover/core/object.hpp @@ -32,6 +32,7 @@ #include "core/error.hpp" #include "core/property.hpp" #include "api/dispatch.hpp" +#include "util/macros.h" /// /// Main namespace of the CL state tracker. |