DOC "Path to libutil header")
ENDIF(LIBUTIL_LIBRARY)
- # Process with warn flags
- IF(CMAKE_COMPILER_IS_GNUCC)
- CHECK_C_COMPILER_FLAG(-Wall SUPPORT_WALL)
- CHECK_C_COMPILER_FLAG(-Wall SUPPORT_W)
- CHECK_C_COMPILER_FLAG(-Wpointer-arith SUPPORT_WPOINTER)
- CHECK_C_COMPILER_FLAG(-Wno-unused-parameter SUPPORT_WPARAM)
- CHECK_C_COMPILER_FLAG(-Wno-unused-function SUPPORT_WFUNCTION)
- CHECK_C_COMPILER_FLAG(-Wunused-variable SUPPORT_WUNUSED_VAR)
- CHECK_C_COMPILER_FLAG(-Wno-pointer-sign SUPPORT_WPOINTER_SIGN)
- CHECK_C_COMPILER_FLAG(-pedantic SUPPORT_PEDANTIC_FLAG)
- CHECK_C_COMPILER_FLAG("-std=c99" SUPPORT_STD_FLAG)
-
- SET(CMAKE_C_WARN_FLAGS "")
-
- IF(SUPPORT_W)
- SET(CMAKE_C_WARN_FLAGS "${CMAKE_C_WARN_FLAGS} -W")
- ENDIF(SUPPORT_W)
- IF(SUPPORT_WALL)
- SET(CMAKE_C_WARN_FLAGS "${CMAKE_C_WARN_FLAGS} -Wall")
- ENDIF(SUPPORT_WALL)
- IF(SUPPORT_WPOINTER)
- SET(CMAKE_C_WARN_FLAGS "${CMAKE_C_WARN_FLAGS} -Wpointer-arith")
- ENDIF(SUPPORT_WPOINTER)
- IF(SUPPORT_WPARAM)
- SET(CMAKE_C_WARN_FLAGS "${CMAKE_C_WARN_FLAGS} -Wno-unused-parameter")
- ENDIF(SUPPORT_WPARAM)
- IF(SUPPORT_WFUNCTION)
- SET(CMAKE_C_WARN_FLAGS "${CMAKE_C_WARN_FLAGS} -Wno-unused-function")
- ENDIF(SUPPORT_WFUNCTION)
- IF(SUPPORT_WUNUSED_VAR)
- SET(CMAKE_C_WARN_FLAGS "${CMAKE_C_WARN_FLAGS} -Wunused-variable")
- ENDIF(SUPPORT_WUNUSED_VAR)
- IF(SUPPORT_WPOINTER_SIGN)
- SET(CMAKE_C_WARN_FLAGS "${CMAKE_C_WARN_FLAGS} -Wno-pointer-sign")
- ENDIF(SUPPORT_WPOINTER_SIGN)
- IF(SUPPORT_PEDANTIC_FLAG)
- SET(CMAKE_C_WARN_FLAGS "${CMAKE_C_WARN_FLAGS} -pedantic")
- ENDIF(SUPPORT_PEDANTIC_FLAG)
- IF(SUPPORT_STD_FLAG)
- SET(CMAKE_C_WARN_FLAGS "${CMAKE_C_WARN_FLAGS} -std=c99")
- ENDIF(SUPPORT_STD_FLAG)
- ENDIF(CMAKE_COMPILER_IS_GNUCC)
+# Process with warn flags
+SET(CMAKE_C_WARN_FLAGS "")
+CHECK_C_COMPILER_FLAG(-Wall SUPPORT_WALL)
+CHECK_C_COMPILER_FLAG(-Wall SUPPORT_W)
+CHECK_C_COMPILER_FLAG(-Wpointer-arith SUPPORT_WPOINTER)
+CHECK_C_COMPILER_FLAG(-Wno-unused-parameter SUPPORT_WPARAM)
+CHECK_C_COMPILER_FLAG(-Wno-unused-function SUPPORT_WFUNCTION)
+CHECK_C_COMPILER_FLAG(-Wunused-variable SUPPORT_WUNUSED_VAR)
+CHECK_C_COMPILER_FLAG(-Wno-pointer-sign SUPPORT_WPOINTER_SIGN)
+CHECK_C_COMPILER_FLAG(-pedantic SUPPORT_PEDANTIC_FLAG)
+IF(SUPPORT_W)
+ SET(CMAKE_C_WARN_FLAGS "${CMAKE_C_WARN_FLAGS} -W")
+ENDIF(SUPPORT_W)
+IF(SUPPORT_WALL)
+ SET(CMAKE_C_WARN_FLAGS "${CMAKE_C_WARN_FLAGS} -Wall")
+ENDIF(SUPPORT_WALL)
+IF(SUPPORT_WPOINTER)
+ SET(CMAKE_C_WARN_FLAGS "${CMAKE_C_WARN_FLAGS} -Wpointer-arith")
+ENDIF(SUPPORT_WPOINTER)
+IF(SUPPORT_WPARAM)
+ SET(CMAKE_C_WARN_FLAGS "${CMAKE_C_WARN_FLAGS} -Wno-unused-parameter")
+ENDIF(SUPPORT_WPARAM)
+IF(SUPPORT_WFUNCTION)
+ SET(CMAKE_C_WARN_FLAGS "${CMAKE_C_WARN_FLAGS} -Wno-unused-function")
+ENDIF(SUPPORT_WFUNCTION)
+IF(SUPPORT_WUNUSED_VAR)
+ SET(CMAKE_C_WARN_FLAGS "${CMAKE_C_WARN_FLAGS} -Wunused-variable")
+ENDIF(SUPPORT_WUNUSED_VAR)
+IF(SUPPORT_WPOINTER_SIGN)
+ SET(CMAKE_C_WARN_FLAGS "${CMAKE_C_WARN_FLAGS} -Wno-pointer-sign")
+ENDIF(SUPPORT_WPOINTER_SIGN)
+IF(SUPPORT_PEDANTIC_FLAG)
+ SET(CMAKE_C_WARN_FLAGS "${CMAKE_C_WARN_FLAGS} -pedantic")
+ENDIF(SUPPORT_PEDANTIC_FLAG)
# Optimization flags
IF(NOT CMAKE_C_OPT_FLAGS)
gunichar *uclabel;
glong uclabel_len;
gsize punylabel_len;
- gchar tmp_label[DNS_D_MAXLABEL];
+ guint8 tmp_label[DNS_D_MAXLABEL];
if (namelen == 0) {
namelen = strlen (name);
/* Check label for unicode characters */
if (maybe_punycode_label (begin, &name_pos, &dot, &label_len)) {
/* Convert to ucs4 */
- uclabel = g_utf8_to_ucs4_fast (begin, label_len, &uclabel_len);
+ uclabel = g_utf8_to_ucs4_fast ((gchar *)begin, label_len, &uclabel_len);
memory_pool_add_destructor (req->pool, g_free, uclabel);
punylabel_len = DNS_D_MAXLABEL;
- punycode_label_toascii (uclabel, uclabel_len, tmp_label, &punylabel_len);
+ punycode_label_toascii (uclabel, uclabel_len, (gchar *)tmp_label, &punylabel_len);
/* Try to compress name */
if (! try_compress_label (req->pool, pos, req->packet, punylabel_len, tmp_label, &table)) {
/* Copy punylabel */
break;
}
}
- c.begin = text_part->content->data;
+ c.begin = (gchar *)text_part->content->data;
c.len = text_part->content->len;
/* Tree would be freed at task pool freeing */
if (!cl->tokenizer->tokenize_func (cl->tokenizer, task->task_pool, &c, &tokens,
cur = g_list_next (cur);
continue;
}
- c.begin = part->content->data;
+ c.begin = (gchar *)part->content->data;
c.len = part->content->len;
is_utf = part->is_utf;
ex = part->urls_offset;
cur = g_list_next (cur);
continue;
}
- c.begin = part->content->data;
+ c.begin = (gchar *)part->content->data;
c.len = part->content->len;
is_utf = part->is_utf;
ex = part->urls_offset;
{
f_str_t f;
- f.begin = in->data;
+ f.begin = (gchar *)in->data;
f.len = in->len;
return fuzzy_init (&f, pool);
cur_ex = cur_offset->data;
}
- begin = part->content->data;
+ begin = (gchar *)part->content->data;
c = begin;
new = memory_pool_alloc0 (pool, sizeof (fuzzy_hash_t));
new2 = memory_pool_alloc0 (pool, sizeof (fuzzy_hash_t));
cur_ex = cur_offset->data;
}
- begin = part->content->data;
+ begin = (gchar *)part->content->data;
c = begin;
end = c + len;
if (part->is_utf) {