Cppcheck fixes

This commit is contained in:
Rafał Mikrut 2020-11-03 06:35:54 +01:00 committed by Jehan
parent fb7a46c6a2
commit 3e35fe4d80
5 changed files with 4 additions and 7 deletions

View file

@ -608,7 +608,6 @@ gimp_color_dialog_colormap_add_activate (GimpColorDialog *dialog)
GimpContext *user_context = viewable_dialog->context->gimp->user_context; GimpContext *user_context = viewable_dialog->context->gimp->user_context;
GimpRGB color; GimpRGB color;
user_context = viewable_dialog->context->gimp->user_context;
gimp_context_get_foreground (user_context, &color); gimp_context_get_foreground (user_context, &color);
gimp_image_add_colormap_entry (dialog->active_image, &color); gimp_image_add_colormap_entry (dialog->active_image, &color);

View file

@ -327,7 +327,7 @@ pattern_to_attrs (const gchar *text,
while (TRUE) while (TRUE)
{ {
while (*p && *q && *q != '_') while (*p && q && *q != '_')
{ {
p = g_utf8_next_char (p); p = g_utf8_next_char (p);
q++; q++;

View file

@ -196,8 +196,6 @@ gimp_chain_button_init (GimpChainButton *button)
button->priv = gimp_chain_button_get_instance_private (button); button->priv = gimp_chain_button_get_instance_private (button);
private = GET_PRIVATE (button);
private->position = GIMP_CHAIN_TOP; private->position = GIMP_CHAIN_TOP;
private->active = FALSE; private->active = FALSE;
private->image = gtk_image_new (); private->image = gtk_image_new ();

View file

@ -884,8 +884,8 @@ fli_write_lc (FILE *f,
while (xc < fli_header->width) while (xc < fli_header->width)
{ {
sc = 0; sc = 0;
while ((linebuf[xc] == old_linebuf[xc]) && while ((xc < fli_header->width) &&
(xc < fli_header->width) && (linebuf[xc] == old_linebuf[xc]) &&
(sc < 255)) (sc < 255))
{ {
xc++; xc++;

View file

@ -147,7 +147,7 @@ d_paint_circle (GfigObject *obj)
gdouble angle = 0; gdouble angle = 0;
gint i = 0; gint i = 0;
while (i < 362) while (i < 361)
{ {
static const gdouble step = 2 * G_PI / 180; static const gdouble step = 2 * G_PI / 180;