Skip to content

Commit

Permalink
Merge branch 'stable'
Browse files Browse the repository at this point in the history
Conflicts:
	connector/c/tntsql/tnt_sql.c
	src/palloc.cc
  • Loading branch information
rtsisyk committed Apr 22, 2014
2 parents 1d1593b + fb2fc28 commit ba44d4d
Show file tree
Hide file tree
Showing 13 changed files with 17 additions and 22 deletions.
5 changes: 5 additions & 0 deletions cmake/BuildLibCJSON.cmake
Expand Up @@ -5,6 +5,11 @@ macro(libcjson_build)
${PROJECT_SOURCE_DIR}/third_party/lua-cjson/strbuf.c
${PROJECT_SOURCE_DIR}/third_party/lua-cjson/fpconv.c)

if (CC_HAS_WNO_UNDEFINED_INLINE)
# inline function 'fpconv_init' is not defined [-Wundefined-inline]
set_source_files_properties(${cjson_src} PROPERTIES
COMPILE_FLAGS "-Wno-undefined-inline")
endif()
add_library(cjson STATIC ${cjson_src})

set(LIBCJSON_INCLUDE_DIR ${PROJECT_SOURCE_DIR}/third_party/lua-cjson)
Expand Down
2 changes: 2 additions & 0 deletions cmake/compiler.cmake
Expand Up @@ -148,11 +148,13 @@ endmacro(enable_tnt_compile_flags)
# GCC can also be built on top of llvm runtime (on mac).
#

check_c_compiler_flag("-Wno-unused-const-variable" CC_HAS_WNO_UNUSED_CONST_VARIABLE)
check_c_compiler_flag("-Wno-unused-result" CC_HAS_WNO_UNUSED_RESULT)
check_c_compiler_flag("-Wno-unused-value" CC_HAS_WNO_UNUSED_VALUE)
check_c_compiler_flag("-fno-strict-aliasing" CC_HAS_FNO_STRICT_ALIASING)
check_c_compiler_flag("-Wno-comment" CC_HAS_WNO_COMMENT)
check_c_compiler_flag("-Wno-parentheses" CC_HAS_WNO_PARENTHESES)
check_c_compiler_flag("-Wno-undefined-inline" CC_HAS_WNO_UNDEFINED_INLINE)

if (CMAKE_COMPILER_IS_CLANG OR CMAKE_COMPILER_IS_GNUCC)
set(HAVE_BUILTIN_CTZ 1)
Expand Down
2 changes: 1 addition & 1 deletion src/CMakeLists.txt
Expand Up @@ -65,7 +65,7 @@ set (common_sources
errinj.cc
errcode.c
assoc.c
say.c
say.cc
fio.c
crc32.c
random.c
Expand Down
2 changes: 1 addition & 1 deletion src/box/engine.h
Expand Up @@ -83,7 +83,7 @@ struct engine_recovery {
engine_replace_f replace;
};

class Engine;
struct Engine;

/** Engine instance */
class EngineFactory: public Object {
Expand Down
2 changes: 1 addition & 1 deletion src/box/key_def.h
Expand Up @@ -243,7 +243,7 @@ key_mp_type_validate(enum field_type key_type, enum mp_type mp_type,
int err, uint32_t field_no)
{
assert(key_type < field_type_MAX);
assert(mp_type < CHAR_BIT * sizeof(*key_mp_type));
assert((int) mp_type < (int) CHAR_BIT * sizeof(*key_mp_type));

if (unlikely((key_mp_type[key_type] & (1U << mp_type)) == 0))
tnt_raise(ClientError, err, field_no,
Expand Down
1 change: 1 addition & 0 deletions src/box/sophia_index.cc
Expand Up @@ -141,6 +141,7 @@ SophiaIndex::memsize() const
struct tuple *
SophiaIndex::findByKey(const char *key, uint32_t part_count) const
{
(void) part_count;
assert(part_count == 1);
assert(key_def->is_unique && part_count == key_def->part_count);
const char *keyptr = key;
Expand Down
4 changes: 2 additions & 2 deletions src/fiber.h
Expand Up @@ -111,7 +111,7 @@ struct fiber {
};

enum { FIBER_CALL_STACK = 16 };
struct Exception;
class Exception;

/**
* @brief An independent execution unit that can be managed by a separate OS
Expand Down Expand Up @@ -153,7 +153,7 @@ struct cord {
struct slab_cache slabc;
char name[FIBER_NAME_MAX];
/** Last thrown exception */
struct Exception *exception;
class Exception *exception;
size_t exception_size;
};

Expand Down
13 changes: 0 additions & 13 deletions src/lua/socket.cc
Expand Up @@ -502,19 +502,6 @@ readline_state_init(struct lua_State *L, struct readline_state *rs, int idx)
}
}

static inline int
readline_state_try(struct readline_state *rs, int i, char chr)
{
if (unlikely(rs[i].sep[ rs[i].pos ] == chr)) {
if (unlikely(rs[i].sep_size == rs[i].pos + 1))
return i;
rs[i].pos++;
} else {
rs[i].pos = 0;
}
return -1;
}

static int
readline_state_next(struct readline_state *rs, int size, char chr)
{
Expand Down
2 changes: 1 addition & 1 deletion src/mutex.h
@@ -1,5 +1,5 @@
#ifndef TARANTOOL_MUTEX_H_INCLUDED
#define TARNATOOL_MUTEX_H_INCLUDED
#define TARANTOOL_MUTEX_H_INCLUDED
/*
* Redistribution and use in source and binary forms, with or
* without modification, are permitted provided that the following
Expand Down
2 changes: 0 additions & 2 deletions src/recovery.cc
Expand Up @@ -108,8 +108,6 @@

struct recovery_state *recovery_state;

static const uint64_t snapshot_cookie = 0;

const char *wal_mode_STRS[] = { "none", "write", "fsync", "fsync_delay", NULL };

/* {{{ LSN API */
Expand Down
File renamed without changes.
1 change: 1 addition & 0 deletions test/unit/CMakeLists.txt
@@ -1,3 +1,4 @@
add_compile_flags("C;CXX" "-Wno-unused")
file(GLOB all_sources *.c *.m *.mm)
set_source_files_compile_flags(${all_sources})

Expand Down
3 changes: 2 additions & 1 deletion third_party/crc32.c
Expand Up @@ -742,6 +742,7 @@ crc32c(uint32_t crc32c,
if (length < 4) {
return (singletable_crc32c(crc32c, buffer, length));
} else {
return (multitable_crc32c(crc32c, buffer, length));
return (multitable_crc32c(crc32c, (const unsigned char *)buffer,
length));
}
}

0 comments on commit ba44d4d

Please sign in to comment.