Commit f5ecc53f authored by Michael Natterer's avatar Michael Natterer

Fix a lot of warnings all over the place

Deprecated stuff, unused variables. Includes parts of a patch from
Shlomi Fish from bug #768855.
parent 44aedebb
......@@ -1243,6 +1243,7 @@ void
context_actions_update (GimpActionGroup *group,
gpointer data)
{
#if 0
GimpContext *context = action_data_get_context (data);
gboolean generated = FALSE;
gdouble radius = 0.0;
......@@ -1272,7 +1273,6 @@ context_actions_update (GimpActionGroup *group,
#define SET_SENSITIVE(action,condition) \
gimp_action_group_set_action_sensitive (group, "context-" action, (condition) != 0)
#if 0
SET_SENSITIVE ("brush-radius-minimum", generated && radius > 1.0);
SET_SENSITIVE ("brush-radius-decrease", generated && radius > 1.0);
SET_SENSITIVE ("brush-radius-decrease-skip", generated && radius > 1.0);
......@@ -1288,7 +1288,7 @@ context_actions_update (GimpActionGroup *group,
SET_SENSITIVE ("brush-angle-maximum", generated);
SET_SENSITIVE ("brush-angle-increase", generated);
SET_SENSITIVE ("brush-angle-increase-skip", generated);
#endif
#undef SET_SENSITIVE
#endif
}
......@@ -82,8 +82,6 @@ G_DEFINE_TYPE (GimpMotionBuffer, gimp_motion_buffer, GIMP_TYPE_OBJECT)
static guint motion_buffer_signals[LAST_SIGNAL] = { 0 };
static const GimpCoords default_coords = GIMP_COORDS_DEFAULT_VALUES;
static void
gimp_motion_buffer_class_init (GimpMotionBufferClass *klass)
......
......@@ -23,6 +23,9 @@
#include <gegl.h>
#include <gtk/gtk.h>
/* we use our own deprecated API here */
#define GIMP_DISABLE_DEPRECATION_WARNINGS
#include "libgimpwidgets/gimpwidgets.h"
#include "gimpuitypes.h"
......
......@@ -24,6 +24,9 @@
#include <gegl.h>
#include <gtk/gtk.h>
/* we use our own deprecated API here */
#define GIMP_DISABLE_DEPRECATION_WARNINGS
#include "libgimpwidgets/gimpwidgets.h"
#include "gimpuitypes.h"
......
......@@ -48,13 +48,17 @@
/*************************/
static const GimpVector2 gimp_vector2_zero = { 0.0, 0.0 };
#if 0
static const GimpVector2 gimp_vector2_unit_x = { 1.0, 0.0 };
static const GimpVector2 gimp_vector2_unit_y = { 0.0, 1.0 };
#endif
static const GimpVector3 gimp_vector3_zero = { 0.0, 0.0, 0.0 };
#if 0
static const GimpVector3 gimp_vector3_unit_x = { 1.0, 0.0, 0.0 };
static const GimpVector3 gimp_vector3_unit_y = { 0.0, 1.0, 0.0 };
static const GimpVector3 gimp_vector3_unit_z = { 0.0, 0.0, 1.0 };
#endif
/**************************************/
/* Two dimensional vector functions */
......
......@@ -132,30 +132,32 @@ static void cdisplay_colorblind_set_deficiency (CdisplayColorblind *c
ColorblindDeficiency value);
/* The RGB<->LMS transforms above are computed from the human cone
* photo-pigment absorption spectra and the monitor phosphor
* emission spectra. These parameters are fairly constant for most
* humans and most monitors (at least for modern CRTs). However,
* gamma will vary quite a bit, as it is a property of the monitor
* (eg. amplifier gain), the video card, and even the
* software. Further, users can adjust their gammas (either via
* adjusting the monitor amp gains or in software). That said, the
* following are the gamma estimates that we have used in the
* Vischeck code. Many colorblind users have viewed our simulations
* and told us that they "work" (simulated and original images are
* indistinguishable).
*/
/* The RGB<->LMS transforms above are computed from the human cone
* photo-pigment absorption spectra and the monitor phosphor
* emission spectra. These parameters are fairly constant for most
* humans and most monitors (at least for modern CRTs). However,
* gamma will vary quite a bit, as it is a property of the monitor
* (eg. amplifier gain), the video card, and even the
* software. Further, users can adjust their gammas (either via
* adjusting the monitor amp gains or in software). That said, the
* following are the gamma estimates that we have used in the
* Vischeck code. Many colorblind users have viewed our simulations
* and told us that they "work" (simulated and original images are
* indistinguishable).
*/
#if 0
/* Gamma conversion is now handled by simply asking for a linear buffer */
static const gfloat gammaRGB = 2.1;
/* For most modern Cathode-Ray Tube monitors (CRTs), the following
* are good estimates of the RGB->LMS and LMS->RGB transform
* matrices. They are based on spectra measured on a typical CRT
* with a PhotoResearch PR650 spectral photometer and the Stockman
* human cone fundamentals. NOTE: these estimates will NOT work well
* for LCDs!
*/
#endif
/* For most modern Cathode-Ray Tube monitors (CRTs), the following
* are good estimates of the RGB->LMS and LMS->RGB transform
* matrices. They are based on spectra measured on a typical CRT
* with a PhotoResearch PR650 spectral photometer and the Stockman
* human cone fundamentals. NOTE: these estimates will NOT work well
* for LCDs!
*/
static const gfloat rgb2lms[9] =
{
0.05059983,
......
......@@ -381,7 +381,7 @@ load_image (const gchar *filename,
guint16 ctx_us;
guint8 *value;
guint32 tag;
gboolean do_toggle_endian = FALSE;
gboolean __attribute__((unused))do_toggle_endian = FALSE;
gboolean implicit_encoding = FALSE;
if (fread (&group_word, 1, 2, DICOM) == 0)
......
......@@ -824,9 +824,9 @@ mng_save_image (const gchar *filename,
const Babl *layer_format;
volatile gint layer_bpp;
guint8 layer_mng_colortype;
guint8 layer_mng_compression_type;
guint8 layer_mng_interlace_type;
guint8 __attribute__((unused))layer_mng_colortype;
guint8 __attribute__((unused))layer_mng_compression_type;
guint8 __attribute__((unused))layer_mng_interlace_type;
gboolean layer_has_unique_palette;
gchar frame_mode;
......
......@@ -854,7 +854,10 @@ read_creator_block (FILE *f,
gchar *string;
gchar *title = NULL, *artist = NULL, *copyright = NULL, *description = NULL;
guint32 dword;
guint32 cdate = 0, mdate = 0, appid, appver;
guint32 __attribute__((unused))cdate = 0;
guint32 __attribute__((unused))mdate = 0;
guint32 __attribute__((unused))appid;
guint32 __attribute__((unused))appver;
GString *comment;
GimpParasite *comment_parasite;
......
......@@ -450,7 +450,7 @@ load_image (const gchar *filename,
return -1;
}
if ((sunhdr.l_ras_type < 0) || (sunhdr.l_ras_type > 5))
if (sunhdr.l_ras_type > 5)
{
g_set_error (error, G_FILE_ERROR, G_FILE_ERROR_FAILED,
"%s",
......@@ -459,7 +459,7 @@ load_image (const gchar *filename,
return -1;
}
if ((sunhdr.l_ras_maplength < 0) || (sunhdr.l_ras_maplength > (256 * 3)))
if (sunhdr.l_ras_maplength > (256 * 3))
{
g_message ("Map lengths greater than 256 entries are unsupported by GIMP.");
gimp_quit ();
......
......@@ -22,10 +22,7 @@
#include "config.h"
#include <gtk/gtk.h>
#include "libgimp/gimp.h"
#include <libgimp/gimp.h>
#include <libgimp/gimpui.h>
#include "imap_commands.h"
......
......@@ -22,7 +22,8 @@
#include "config.h"
#include <gtk/gtk.h>
#include <libgimp/gimp.h>
#include <libgimp/gimpui.h>
#include "imap_table.h"
......
This diff is collapsed.
This diff is collapsed.
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