PROJECT (createrepo_c)
CMAKE_MINIMUM_REQUIRED (VERSION 2.6)
+set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99")
set (CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS} -Wall -Wextra")
IF(NOT CMAKE_BUILD_TYPE)
SET(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING
-inline gchar *
+static inline gchar *
cr_chunk_insert_len_or_null (GStringChunk *chunk, const gchar *str, gssize len)
{
if (!str || len <= 0)
#include "misc.h"
-inline gchar *
+static inline gchar *
cr_safe_string_chunk_insert(GStringChunk *chunk, const char *str)
{
if (!chunk || !str) {
}
-inline int
+static inline int
cr_compare_dependency(const char *dep1, const char *dep2)
{
/* Compares two dependency by name
void
cr_package_parser_init()
{
- rpmKeyring keyring;
-
if (cr_initialized)
return;
cr_initialized = 1;
}
-inline const char *
+static inline const char *
prevent_null(const char *str)
{
if (!str)
return str;
}
-inline const char *
+static inline const char *
force_null(const char *str)
{
if (!str || str[0] == '\0')
xmlNodePtr child;
if (!orig_content) {
- content = "";
+ content = BAD_CAST "";
} else if (xmlCheckUTF8(orig_content)) {
content = (xmlChar *) orig_content;
} else {
- size_t len = strlen(orig_content);
+ size_t len = strlen((const char *) orig_content);
content = malloc(sizeof(xmlChar)*len*2 + 1);
cr_latin1_to_utf8(orig_content, content);
free_content = 1;
xmlAttrPtr attr;
if (!orig_content) {
- content = "";
+ content = BAD_CAST "";
} else if (xmlCheckUTF8(orig_content)) {
content = (xmlChar *) orig_content;
} else {
- size_t len = strlen(orig_content);
+ size_t len = strlen((const char *) orig_content);
content = malloc(sizeof(xmlChar)*len*2 + 1);
cr_latin1_to_utf8(orig_content, content);
free_content = 1;