Cast uint to int before applying unary minus

master
Yevgen Muntyan 2006-06-13 00:56:26 -05:00
parent 5a71ec9502
commit bf6a0bc455
2 changed files with 3 additions and 3 deletions

View File

@ -722,7 +722,7 @@ attr_compose (MooHtmlAttr *dest,
else if (dest->mask & (MOO_HTML_LARGER | MOO_HTML_SMALLER))
{
int size = 3;
int scale = (dest->mask & MOO_HTML_LARGER) ? dest->scale : -dest->scale;
int scale = (dest->mask & MOO_HTML_LARGER) ? (int)dest->scale : -((int)dest->scale);
if (src->mask & (MOO_HTML_LARGER | MOO_HTML_SMALLER))
{

View File

@ -100,9 +100,9 @@ _moo_line_buffer_delete (LineBuffer *line_buf,
old_marks = line->marks;
n_old_marks = line->n_marks;
line->marks = NULL;
if (n_old_marks)
_moo_text_btree_update_n_marks (line_buf->tree, line, -n_old_marks);
_moo_text_btree_update_n_marks (line_buf->tree, line, -((int) n_old_marks));
g_assert (line->n_marks == 0);
}