Skip to content
Snippets Groups Projects
Commit 82c5b4b4 authored by Roman Tsisyk's avatar Roman Tsisyk
Browse files

Fix warnings detected by clang

parent 3fb01a82
No related branches found
No related tags found
No related merge requests found
......@@ -108,7 +108,8 @@ endif()
if (CMAKE_COMPILER_IS_CLANG)
add_compile_flags("OBJC"
"-fobjc-nonfragile-abi"
"-fno-objc-legacy-dispatch")
"-fno-objc-legacy-dispatch"
"-Wno-objc-root-class")
endif()
if (CMAKE_COMPILER_IS_CLANGXX)
......
......@@ -43,7 +43,7 @@
enum { SERVICE_NAME_MAXLEN = 32 };
@interface SocketError: SystemError
- (id) init: (int) fd in: (const char *) format: (va_list) ap;
- (id) init: (int) fd in: (const char *) format :(va_list) ap;
- (id) init: (int) fd in: (const char *) format, ...;
@end
......
......@@ -235,8 +235,9 @@ bitset_index_iterator_next(struct iterator *iterator)
return ret;
}
- (void) initIterator: (struct iterator *) iterator:(enum iterator_type) type
:(const void *) key :(u32) part_count
- (void) initIterator: (struct iterator *) iterator
:(enum iterator_type) type
:(const void *) key :(u32) part_count
{
assert(iterator->free == bitset_index_iterator_free);
struct bitset_index_iterator *it = bitset_index_iterator(iterator);
......
......@@ -153,7 +153,7 @@ lbox_tuple_slice(struct lua_State *L)
} else if (field_no < 0 && -field_no <= tuple->field_count) {
start = field_no + tuple->field_count;
} else {
luaL_error(L, "tuple.slice(): start >= field count");
return luaL_error(L, "tuple.slice(): start >= field count");
}
if (argc == 2) {
......@@ -163,13 +163,13 @@ lbox_tuple_slice(struct lua_State *L)
} else if (field_no < 0 && -field_no < tuple->field_count) {
end = field_no + tuple->field_count;
} else {
luaL_error(L, "tuple.slice(): end > field count");
return luaL_error(L, "tuple.slice(): end > field count");
}
} else {
end = tuple->field_count;
}
if (end <= start)
luaL_error(L, "tuple.slice(): start must be less than end");
return luaL_error(L, "tuple.slice(): start must be less than end");
const void *field = tuple->data;
u32 fieldno = 0;
......
......@@ -507,7 +507,7 @@ log_io_sync(struct log_io *l)
}
static int
log_io_write_header(struct log_io *l)
log_io_write_header(struct log_io *l)
{
int ret = fprintf(l->f, "%s%s\n", l->dir->filetype, v11);
......@@ -582,12 +582,16 @@ log_io_open(struct log_dir *dir, enum log_mode mode,
l->dir = dir;
l->is_inprogress = suffix == INPROGRESS;
if (mode == LOG_READ) {
if (log_io_verify_meta(l, &errmsg) != 0)
if (log_io_verify_meta(l, &errmsg) != 0) {
errmsg = strerror(errno);
goto error;
}
} else { /* LOG_WRITE */
setvbuf(l->f, NULL, _IONBF, 0);
if (log_io_write_header(l) != 0)
if (log_io_write_header(l) != 0) {
errmsg = strerror(errno);
goto error;
}
}
return l;
error:
......
......@@ -62,7 +62,7 @@ sio_socketname(int fd)
}
@implementation SocketError
- (id) init: (int) fd in: (const char *) format: (va_list) ap
- (id) init: (int) fd in: (const char *) format :(va_list) ap
{
int save_errno = errno;
char buf[TNT_ERRMSG_MAX];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment