Silence compilation warning in allocator.h
authorDerek Murray <mrry@google.com>
Fri, 23 Mar 2018 17:12:05 +0000 (10:12 -0700)
committerTensorFlower Gardener <gardener@tensorflow.org>
Sun, 25 Mar 2018 09:28:40 +0000 (02:28 -0700)
Some builds report the following warning (even though LOG(FATAL) is terminal):

```
./tensorflow/core/framework/device_base.h(188): warning: missing return statement at end of non-void function "tensorflow::DeviceBase::GetScopedAllocator"
```

PiperOrigin-RevId: 190235863

tensorflow/core/framework/device_base.h

index 52b9077..8473b22 100644 (file)
@@ -185,6 +185,7 @@ class DeviceBase {
   virtual Allocator* GetScopedAllocator(AllocatorAttributes attr,
                                         int64 step_id) {
     LOG(FATAL) << "Device does not implement GetScopedAllocator()";
+    return nullptr;
   }
 
   virtual ScopedAllocatorMgr* GetScopedAllocatorMgr() const { return nullptr; }