Commit 8f49fad3 authored by Jehan's avatar Jehan

plug-ins: fix a few more warnings.

There are still a bunch of warnings, especially regarding usage of
GtkTable, GtkMisc and some unused functions.
parent 67a80c86
......@@ -1794,10 +1794,10 @@ static gint save_dialog(gint32 image_id, gint32 drawable_id)
basetype = gimp_image_base_type(image_id);
dlg = gimp_dialog_new("Save as DDS", "dds", NULL, GTK_WIN_POS_MOUSE,
dlg = gimp_dialog_new ("Save as DDS", "dds", NULL, GTK_WIN_POS_MOUSE,
gimp_standard_help_func, SAVE_PROC,
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
GTK_STOCK_OK, GTK_RESPONSE_OK,
_("Cancel"), GTK_RESPONSE_CANCEL,
_("OK"), GTK_RESPONSE_OK,
NULL);
g_signal_connect(dlg, "response",
......@@ -1809,7 +1809,7 @@ static gint save_dialog(gint32 image_id, gint32 drawable_id)
gtk_window_set_resizable(GTK_WINDOW(dlg), 0);
vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 4);
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 4);
gtk_container_set_border_width(GTK_CONTAINER(vbox), 8);
gtk_box_pack_start(GTK_BOX(gtk_dialog_get_content_area (GTK_DIALOG(dlg))),
vbox, 1, 1, 0);
......@@ -1908,7 +1908,7 @@ static gint save_dialog(gint32 image_id, gint32 drawable_id)
is_mipmap_chain_valid);
hbox = gtk_hbox_new(0, 8);
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 8);
gtk_box_pack_start(GTK_BOX(vbox), hbox, 1, 1, 0);
gtk_widget_show(hbox);
......@@ -1960,7 +1960,7 @@ static gint save_dialog(gint32 image_id, gint32 drawable_id)
gtk_widget_show(expander);
vbox2 = gtk_vbox_new(0, 4);
vbox2 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 4);
gtk_container_add(GTK_CONTAINER(expander), vbox2);
gtk_widget_show(vbox2);
......
......@@ -391,6 +391,7 @@ static void scale_image(unsigned char *dst, int dw, int dh,
float yscale = MIN(yfactor, 1.0f) / blur;
float xsupport = support / xscale;
float ysupport = support / yscale;
unsigned char *tmp;
if(xsupport <= 0.5f)
{
......@@ -403,8 +404,6 @@ static void scale_image(unsigned char *dst, int dw, int dh,
yscale = 1.0f;
}
unsigned char *tmp;
#ifdef _OPENMP
tmp = g_malloc(sw * bpp * omp_get_max_threads());
#else
......@@ -543,13 +542,6 @@ static void scale_volume_image(unsigned char *dst, int dw, int dh, int dd,
wrapfunc_t wrap,
int gc, float gamma)
{
/* down to a 2D image, use the faster 2D image resampler */
if(dd == 1 && sd == 1)
{
scale_image(dst, dw, dh, src, sw, sh, bpp, filter, support, wrap, gc, gamma);
return;
}
const float blur = 1.0f;
const float xfactor = (float)dw / (float)sw;
const float yfactor = (float)dh / (float)sh;
......@@ -568,6 +560,14 @@ static void scale_volume_image(unsigned char *dst, int dw, int dh, int dd,
float xsupport = support / xscale;
float ysupport = support / yscale;
float zsupport = support / zscale;
unsigned char *tmp1, *tmp2;
/* down to a 2D image, use the faster 2D image resampler */
if(dd == 1 && sd == 1)
{
scale_image(dst, dw, dh, src, sw, sh, bpp, filter, support, wrap, gc, gamma);
return;
}
if(xsupport <= 0.5f)
{
......@@ -585,8 +585,6 @@ static void scale_volume_image(unsigned char *dst, int dw, int dh, int dd,
zscale = 1.0f;
}
unsigned char *tmp1, *tmp2;
tmp1 = g_malloc(sh * sw * bpp);
tmp2 = g_malloc(dh * sw * bpp);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment