Commit 5bec541e authored by Kenton Varda's avatar Kenton Varda

tweaks

parent 4cbb1a4d
......@@ -153,7 +153,7 @@ TEST(Array, AraryBuilder) {
{
ArrayBuilder<TestObject> builder = heapArrayBuilder<TestObject>(32);
for (uint i = 0; i < 32; i++) {
for (int i = 0; i < 32; i++) {
EXPECT_EQ(i, TestObject::count);
builder.add();
}
......
......@@ -22,7 +22,6 @@
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "array.h"
#include <iostream>
namespace kj {
......
......@@ -23,7 +23,6 @@
#include "common.h"
#include "logging.h"
#include <stdlib.h>
namespace kj {
namespace internal {
......@@ -35,10 +34,6 @@ void inlinePreconditionFailure(const char* file, int line, const char* expectati
} else {
Log::fatalFault(file, line, Exception::Nature::PRECONDITION, expectation, macroArgs, message);
}
// GCC prints a warning that this function returns even though Log::fatalFault() is clearly
// marked noreturn. Make the warning go away by calling abort()...
abort();
}
} // namespace internal
......
......@@ -25,7 +25,7 @@
#include "logging.h"
#include <unistd.h>
#include <sys/uio.h>
#include <string>
#include <algorithm>
namespace kj {
......
......@@ -24,7 +24,7 @@
#ifndef KJ_IO_H_
#define KJ_IO_H_
#include <cstddef>
#include <stddef.h>
#include "common.h"
#include "array.h"
......@@ -222,7 +222,7 @@ class AutoCloseFd {
public:
inline AutoCloseFd(): fd(-1) {}
inline AutoCloseFd(std::nullptr_t): fd(-1) {}
inline AutoCloseFd(decltype(nullptr)): fd(-1) {}
inline explicit AutoCloseFd(int fd): fd(fd) {}
inline AutoCloseFd(AutoCloseFd&& other): fd(other.fd) { other.fd = -1; }
KJ_DISALLOW_COPY(AutoCloseFd);
......@@ -231,8 +231,8 @@ public:
inline operator int() { return fd; }
inline int get() { return fd; }
inline bool operator==(std::nullptr_t) { return fd < 0; }
inline bool operator!=(std::nullptr_t) { return fd >= 0; }
inline bool operator==(decltype(nullptr)) { return fd < 0; }
inline bool operator!=(decltype(nullptr)) { return fd >= 0; }
private:
int fd;
......
......@@ -29,8 +29,6 @@
#define KJ_TYPE_SAFETY_H_
#include "common.h"
#include <cstddef>
#include <string.h>
namespace kj {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment