diff --git a/src/libcroco/cr-rgb.c b/src/libcroco/cr-rgb.c
index 4bda1968e25b5b45af3a2e614e2c40583f17bf4e..893c2080b6e27132306fa3fed9b5b754d455f1f5 100644 (file)
--- a/src/libcroco/cr-rgb.c
+++ b/src/libcroco/cr-rgb.c
CRRgb *
cr_rgb_new (void)
{
- CRRgb *result = NULL;
-
- result = g_try_malloc (sizeof (CRRgb));
+ CRRgb *result = (CRRgb *)g_try_malloc (sizeof (CRRgb));
if (result == NULL) {
cr_utils_trace_info ("No more memory");
guchar *
cr_rgb_to_string (CRRgb * a_this)
{
- guchar *result = NULL;
- GString *str_buf = NULL;
-
- str_buf = g_string_new (NULL);
+ gchar *result = NULL;
+ GString *str_buf = (GString *)g_string_new (NULL);
g_return_val_if_fail (str_buf, NULL);
if (a_this->is_percentage == 1) {
g_string_free (str_buf, FALSE);
}
- return result;
+ return (guchar *)result;
}
/**
g_return_val_if_fail (a_this && a_color_name, CR_BAD_PARAM_ERROR);
for (i = 0; i < sizeof (gv_standard_colors); i++) {
- if (!strcmp (a_color_name, gv_standard_colors[i].name)) {
+ if (!strcmp ((char *)a_color_name, gv_standard_colors[i].name)) {
cr_rgb_set_from_rgb (a_this, &gv_standard_colors[i]);
break;
}
g_return_val_if_fail (a_this && a_hex, CR_BAD_PARAM_ERROR);
- if (strlen (a_hex) == 3) {
+ if (strlen ((char *)a_hex) == 3) {
for (i = 0; i < 3; i++) {
if (a_hex[i] >= '0' && a_hex[i] <= '9') {
colors[i] = a_hex[i] - '0';
status = CR_UNKNOWN_TYPE_ERROR;
}
}
- } else if (strlen (a_hex) == 6) {
+ } else if (strlen ((char *)a_hex) == 6) {
for (i = 0; i < 6; i++) {
if (a_hex[i] >= '0' && a_hex[i] <= '9') {
colors[i / 2] <<= 4;
enum CRStatus
cr_rgb_set_from_term (CRRgb *a_this, const struct _CRTerm *a_value)
{
- enum CRStatus status = CR_OK ;
- g_return_val_if_fail (a_this && a_value,
+ enum CRStatus status = CR_OK ;
+ g_return_val_if_fail (a_this && a_value,
CR_BAD_PARAM_ERROR) ;
switch(a_value->type) {
} else {
status = cr_rgb_set_from_name
(a_this,
- a_value->content.str->stryng->str) ;
+ (guchar *)a_value->content.str->stryng->str) ;
}
} else {
cr_utils_trace_info
&& a_value->content.str->stryng->str) {
status = cr_rgb_set_from_hex_str
(a_this,
- a_value->content.str->stryng->str) ;
+ (guchar *)a_value->content.str->stryng->str) ;
} else {
cr_utils_trace_info
("a_value has NULL string value") ;
g_return_val_if_fail (a_str, NULL);
- parser = cr_parser_new_from_buf ((guchar*)a_str, strlen (a_str),
+ parser = cr_parser_new_from_buf ((guchar *)a_str, strlen ((char *)a_str),
a_enc, FALSE) ;
g_return_val_if_fail (parser, NULL);