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;
GimpRGB color;
user_context = viewable_dialog->context->gimp->user_context;
gimp_context_get_foreground (user_context, &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 (*p && *q && *q != '_')
while (*p && q && *q != '_')
{
p = g_utf8_next_char (p);
q++;

View File

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

View File

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

View File

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