Author: abrander
Date: 2010-01-27 09:37:28 +0100 (Wed, 27 Jan 2010)
New Revision: 3090
Modified:
branches/rawstudio-ng-color/librawstudio/rs-color-transform.c
branches/rawstudio-ng-color/librawstudio/rs-color.c
branches/rawstudio-ng-color/librawstudio/rs-filter.c
branches/rawstudio-ng-color/librawstudio/rs-io-job-prefetch.c
branches/rawstudio-ng-color/librawstudio/rs-io.c
branches/rawstudio-ng-color/librawstudio/rs-job-queue.c
branches/rawstudio-ng-color/librawstudio/rs-lens-db-editor.c
branches/rawstudio-ng-color/librawstudio/rs-math.c
branches/rawstudio-ng-color/librawstudio/rs-output.c
branches/rawstudio-ng-color/librawstudio/rs-plugin-manager.c
branches/rawstudio-ng-color/librawstudio/rs-settings.c
branches/rawstudio-ng-color/librawstudio/rs-tiff-ifd-entry.c
branches/rawstudio-ng-color/librawstudio/rs-tiff-ifd.h
branches/rawstudio-ng-color/librawstudio/rs-tiff.c
branches/rawstudio-ng-color/librawstudio/rs-utils.c
Log:
Fixed a few warnings.
Modified: branches/rawstudio-ng-color/librawstudio/rs-color-transform.c
===================================================================
--- branches/rawstudio-ng-color/librawstudio/rs-color-transform.c
2010-01-27 08:32:06 UTC (rev 3089)
+++ branches/rawstudio-ng-color/librawstudio/rs-color-transform.c
2010-01-27 08:37:28 UTC (rev 3090)
@@ -21,6 +21,9 @@
#include <string.h> /* memset() */
#include <math.h> /* pow() */
+/* FIXME: Stupid hack */
+extern void rs_cms_do_transform(gpointer transform, gpointer input, gpointer
output, guint size);
+
static void make_tables(RSColorTransform *rct);
static gboolean select_render(RSColorTransform *rct);
Modified: branches/rawstudio-ng-color/librawstudio/rs-color.c
===================================================================
--- branches/rawstudio-ng-color/librawstudio/rs-color.c 2010-01-27 08:32:06 UTC
(rev 3089)
+++ branches/rawstudio-ng-color/librawstudio/rs-color.c 2010-01-27 08:37:28 UTC
(rev 3090)
@@ -23,7 +23,7 @@
/* We use XYZ with a D50 whitepoint as PCS (as recommended by ICC) */
-const RS_XYZ_VECTOR XYZ_WP_D50 = {0.964296, 1.0, 0.825105}; /* Computed by DNG
SDK */
+const RS_XYZ_VECTOR XYZ_WP_D50 = {{0.964296}, {1.0}, {0.825105}}; /* Computed
by DNG SDK */
/* Scale factor between distances in uv space to a more user friendly "tint"
parameter. */
static const gdouble tint_scale = -3000.0;
@@ -155,7 +155,7 @@
RS_xy_COORD
rs_color_temp_to_whitepoint(gfloat temp, gfloat tint)
{
- RS_xy_COORD xy;
+ RS_xy_COORD xy = XYZ_to_xy(&XYZ_WP_D50);
/* Find inverse temperature to use as index. */
gdouble r = 1.0E6 / temp;
Modified: branches/rawstudio-ng-color/librawstudio/rs-filter.c
===================================================================
--- branches/rawstudio-ng-color/librawstudio/rs-filter.c 2010-01-27
08:32:06 UTC (rev 3089)
+++ branches/rawstudio-ng-color/librawstudio/rs-filter.c 2010-01-27
08:37:28 UTC (rev 3090)
@@ -17,6 +17,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
USA.
*/
+#include <stdlib.h> /* system() */
#include <rawstudio.h>
#include "rs-filter.h"
@@ -183,7 +184,7 @@
/* This timer-hack will break badly when multithreaded! */
static gfloat last_elapsed = 0.0;
- static count = -1;
+ static gint count = -1;
gfloat elapsed;
static GTimer *gt = NULL;
@@ -258,11 +259,11 @@
/* This timer-hack will break badly when multithreaded! */
static gfloat last_elapsed = 0.0;
- static count = -1;
+ static gint count = -1;
gfloat elapsed;
static GTimer *gt = NULL;
- RSFilterResponse *response;
+ RSFilterResponse *response = NULL;
GdkPixbuf *image = NULL;
g_assert(RS_IS_FILTER(filter));
@@ -363,9 +364,9 @@
gchar *property_name;
RSFilter *current_filter;
GParamSpec *spec;
- RSFilter *first_seen_here;
+ RSFilter *first_seen_here = NULL;
GTypeValueTable *table = NULL;
- GType type;
+ GType type = 0;
union CValue {
gint v_int;
glong v_long;
@@ -388,7 +389,7 @@
current_filter = filter;
/* Iterate through all filters previous to filter */
do {
- if (spec =
g_object_class_find_property(G_OBJECT_GET_CLASS(current_filter), property_name))
+ if ((spec =
g_object_class_find_property(G_OBJECT_GET_CLASS(current_filter),
property_name)))
if (spec->flags & G_PARAM_WRITABLE)
{
/* If we got no GTypeValueTable at this
point, we aquire
@@ -561,7 +562,8 @@
GObjectClass *klass = G_OBJECT_GET_CLASS(filter);
GParamSpec **specs;
- gint i, n_specs = 0;
+ gint i;
+ guint n_specs = 0;
/* Filter name (and label) */
g_string_append_printf(str, "\t\t<tr>\n\t\t\t<td colspan=\"2\"
bgcolor=\"black\"><font color=\"white\">%s", RS_FILTER_NAME(filter));
@@ -665,6 +667,7 @@
void
rs_filter_graph(RSFilter *filter)
{
+ gint ignore;
g_assert(RS_IS_FILTER(filter));
GString *str = g_string_new("digraph G {\n");
@@ -673,8 +676,8 @@
g_string_append_printf(str, "}\n");
g_file_set_contents("/tmp/rs-filter-graph", str->str, str->len, NULL);
- system("dot -Tpng >/tmp/rs-filter-graph.png </tmp/rs-filter-graph");
- system("gnome-open /tmp/rs-filter-graph.png");
+ ignore = system("dot -Tpng >/tmp/rs-filter-graph.png
</tmp/rs-filter-graph");
+ ignore = system("gnome-open /tmp/rs-filter-graph.png");
g_string_free(str, TRUE);
}
Modified: branches/rawstudio-ng-color/librawstudio/rs-io-job-prefetch.c
===================================================================
--- branches/rawstudio-ng-color/librawstudio/rs-io-job-prefetch.c
2010-01-27 08:32:06 UTC (rev 3089)
+++ branches/rawstudio-ng-color/librawstudio/rs-io-job-prefetch.c
2010-01-27 08:37:28 UTC (rev 3090)
@@ -26,6 +26,7 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
+#include "rs-io.h"
#include "rs-io-job-prefetch.h"
typedef struct {
Modified: branches/rawstudio-ng-color/librawstudio/rs-io.c
===================================================================
--- branches/rawstudio-ng-color/librawstudio/rs-io.c 2010-01-27 08:32:06 UTC
(rev 3089)
+++ branches/rawstudio-ng-color/librawstudio/rs-io.c 2010-01-27 08:37:28 UTC
(rev 3090)
@@ -175,7 +175,7 @@
/* Put a marker in the queue, we will rotate the complete queue, so we
have to know when we're around */
g_async_queue_push_unlocked(queue, marker_job);
- while(current_job = g_async_queue_pop_unlocked(queue))
+ while((current_job = g_async_queue_pop_unlocked(queue)))
{
/* If current job matches marker, we're done */
if (current_job == marker_job)
@@ -212,7 +212,7 @@
/* Put a marker in the queue, we will rotate the complete queue, so we
have to know when we're around */
g_async_queue_push_unlocked(queue, marker_job);
- while(current_job = g_async_queue_pop_unlocked(queue))
+ while((current_job = g_async_queue_pop_unlocked(queue)))
{
/* If current job matches marker, we're done */
if (current_job == marker_job)
Modified: branches/rawstudio-ng-color/librawstudio/rs-job-queue.c
===================================================================
--- branches/rawstudio-ng-color/librawstudio/rs-job-queue.c 2010-01-27
08:32:06 UTC (rev 3089)
+++ branches/rawstudio-ng-color/librawstudio/rs-job-queue.c 2010-01-27
08:37:28 UTC (rev 3090)
@@ -211,8 +211,6 @@
static void
job_consumer(gpointer data, gpointer unused)
{
- gpointer result;
-
RSJob *job = (RSJob *) data;
RSJobQueueSlot *slot = rs_job_queue_add_slot(job->job_queue);
@@ -273,6 +271,8 @@
g_thread_pool_push(job_queue->pool, job, NULL);
g_mutex_unlock(job_queue->lock);
+
+ return job;
}
/**
Modified: branches/rawstudio-ng-color/librawstudio/rs-lens-db-editor.c
===================================================================
--- branches/rawstudio-ng-color/librawstudio/rs-lens-db-editor.c
2010-01-27 08:32:06 UTC (rev 3089)
+++ branches/rawstudio-ng-color/librawstudio/rs-lens-db-editor.c
2010-01-27 08:37:28 UTC (rev 3090)
@@ -653,7 +653,7 @@
GDir *dir = g_dir_open(target, 0, NULL);
const gchar *fn = NULL;
- while (fn = g_dir_read_name (dir))
+ while ((fn = g_dir_read_name (dir)))
{
GPatternSpec *ps = g_pattern_spec_new ("*.xml");
if (g_pattern_match (ps, strlen(fn), fn, NULL))
Modified: branches/rawstudio-ng-color/librawstudio/rs-math.c
===================================================================
--- branches/rawstudio-ng-color/librawstudio/rs-math.c 2010-01-27 08:32:06 UTC
(rev 3089)
+++ branches/rawstudio-ng-color/librawstudio/rs-math.c 2010-01-27 08:37:28 UTC
(rev 3090)
@@ -42,7 +42,7 @@
void
printmat3(RS_MATRIX3 *mat)
{
- int x, y;
+ int y;
printf("M: matrix(\n");
for(y=0; y<3; y++)
Modified: branches/rawstudio-ng-color/librawstudio/rs-output.c
===================================================================
--- branches/rawstudio-ng-color/librawstudio/rs-output.c 2010-01-27
08:32:06 UTC (rev 3089)
+++ branches/rawstudio-ng-color/librawstudio/rs-output.c 2010-01-27
08:37:28 UTC (rev 3090)
@@ -98,6 +98,15 @@
return FALSE;
}
+/* FIXME: This is a fucking stupid hack to get by until config is moved
+ * into librawstudio */
+extern gchar *rs_conf_get_string(const gchar *name);
+extern gboolean rs_conf_set_string(const gchar *path, const gchar *string);
+extern gboolean rs_conf_get_integer(const gchar *name, gint *integer_value);
+extern gboolean rs_conf_set_integer(const gchar *name, const gint
integer_value);
+extern gboolean rs_conf_get_boolean(const gchar *name, gboolean
*boolean_value);
+extern gboolean rs_conf_set_boolean(const gchar *name, gboolean bool_value);
+
static void
integer_changed(GtkAdjustment *adjustment, gpointer user_data)
{
@@ -144,10 +153,6 @@
rs_conf_set_string(confpath, value);
}
-/* FIXME: This is a fucking stupid hack to get by until config is moved
- * into librawstudio */
-gchar *rs_conf_get_string(const gchar *name);
-
/**
* Load parameters from config for a RSOutput
* @param output A RSOutput
@@ -158,7 +163,7 @@
{
GObjectClass *klass = G_OBJECT_GET_CLASS(output);
GParamSpec **specs;
- gint n_specs = 0;
+ guint n_specs = 0;
gint i;
g_assert(RS_IS_OUTPUT(output));
@@ -217,7 +222,7 @@
GtkWidget *box = gtk_vbox_new(FALSE, 0);
GObjectClass *klass = G_OBJECT_GET_CLASS(output);
GParamSpec **specs;
- gint n_specs = 0;
+ guint n_specs = 0;
gint i;
/* Maintain a reference to the RSOutput */
Modified: branches/rawstudio-ng-color/librawstudio/rs-plugin-manager.c
===================================================================
--- branches/rawstudio-ng-color/librawstudio/rs-plugin-manager.c
2010-01-27 08:32:06 UTC (rev 3089)
+++ branches/rawstudio-ng-color/librawstudio/rs-plugin-manager.c
2010-01-27 08:37:28 UTC (rev 3090)
@@ -77,7 +77,7 @@
{
RSFilterClass *klass;
GParamSpec **specs;
- gint n_specs = 0;
+ guint n_specs = 0;
gint s;
/* NOTE: Some plugins depend on all classes is initialized
before ANY
* instance instantiation takes place, it is NOT safe to just
remove
@@ -110,7 +110,7 @@
{
RSOutputClass *klass;
GParamSpec **specs;
- gint n_specs = 0;
+ guint n_specs = 0;
gint s;
klass = g_type_class_ref(plugins[i]);
g_debug("* %s: %s", g_type_name(plugins[i]),
klass->display_name);
Modified: branches/rawstudio-ng-color/librawstudio/rs-settings.c
===================================================================
--- branches/rawstudio-ng-color/librawstudio/rs-settings.c 2010-01-27
08:32:06 UTC (rev 3089)
+++ branches/rawstudio-ng-color/librawstudio/rs-settings.c 2010-01-27
08:37:28 UTC (rev 3090)
@@ -18,6 +18,7 @@
*/
#include "rs-settings.h"
+#include "rs-utils.h"
#include <config.h>
#include "gettext.h"
#include <string.h> /* memcmp() */
@@ -255,53 +256,54 @@
rs_settings_reset(RSSettings *settings, const RSSettingsMask mask)
{
g_assert(RS_IS_SETTINGS(settings));
+ GObject *object = G_OBJECT(settings);
rs_settings_commit_start(settings);
if (mask & MASK_EXPOSURE)
- rs_object_class_property_reset(settings, "exposure");
+ rs_object_class_property_reset(object, "exposure");
if (mask & MASK_SATURATION)
- rs_object_class_property_reset(settings, "saturation");
+ rs_object_class_property_reset(object, "saturation");
if (mask & MASK_HUE)
- rs_object_class_property_reset(settings, "hue");
+ rs_object_class_property_reset(object, "hue");
if (mask & MASK_CONTRAST)
- rs_object_class_property_reset(settings, "contrast");
+ rs_object_class_property_reset(object, "contrast");
if (mask & MASK_WARMTH)
- rs_object_class_property_reset(settings, "warmth");
+ rs_object_class_property_reset(object, "warmth");
if (mask & MASK_TINT)
- rs_object_class_property_reset(settings, "tint");
+ rs_object_class_property_reset(object, "tint");
if (mask & MASK_SHARPEN)
- rs_object_class_property_reset(settings, "sharpen");
+ rs_object_class_property_reset(object, "sharpen");
if (mask & MASK_DENOISE_LUMA)
- rs_object_class_property_reset(settings, "denoise_luma");
+ rs_object_class_property_reset(object, "denoise_luma");
if (mask & MASK_DENOISE_CHROMA)
- rs_object_class_property_reset(settings, "denoise_chroma");
+ rs_object_class_property_reset(object, "denoise_chroma");
if (mask & MASK_TCA_KR)
- rs_object_class_property_reset(settings, "tca_kr");
+ rs_object_class_property_reset(object, "tca_kr");
if (mask & MASK_TCA_KB)
- rs_object_class_property_reset(settings, "tca_kb");
+ rs_object_class_property_reset(object, "tca_kb");
if (mask & MASK_VIGNETTING_K2)
- rs_object_class_property_reset(settings, "vignetting_k2");
+ rs_object_class_property_reset(object, "vignetting_k2");
if (mask & MASK_CHANNELMIXER_RED)
- rs_object_class_property_reset(settings, "channelmixer_red");
+ rs_object_class_property_reset(object, "channelmixer_red");
if (mask & MASK_CHANNELMIXER_GREEN)
- rs_object_class_property_reset(settings, "channelmixer_green");
+ rs_object_class_property_reset(object, "channelmixer_green");
if (mask & MASK_CHANNELMIXER_BLUE)
- rs_object_class_property_reset(settings, "channelmixer_blue");
+ rs_object_class_property_reset(object, "channelmixer_blue");
if (mask && MASK_CURVE)
{
Modified: branches/rawstudio-ng-color/librawstudio/rs-tiff-ifd-entry.c
===================================================================
--- branches/rawstudio-ng-color/librawstudio/rs-tiff-ifd-entry.c
2010-01-27 08:32:06 UTC (rev 3089)
+++ branches/rawstudio-ng-color/librawstudio/rs-tiff-ifd-entry.c
2010-01-27 08:37:28 UTC (rev 3090)
@@ -219,7 +219,6 @@
RSTiffIfdEntry *
rs_tiff_ifd_entry_new(RSTiff *tiff, guint offset)
{
- gint i;
RSTiffIfdEntry *entry = g_object_new(RS_TYPE_TIFF_IFD_ENTRY, NULL);
entry->tag = rs_tiff_get_ushort(tiff, offset+0);
Modified: branches/rawstudio-ng-color/librawstudio/rs-tiff-ifd.h
===================================================================
--- branches/rawstudio-ng-color/librawstudio/rs-tiff-ifd.h 2010-01-27
08:32:06 UTC (rev 3089)
+++ branches/rawstudio-ng-color/librawstudio/rs-tiff-ifd.h 2010-01-27
08:37:28 UTC (rev 3090)
@@ -36,6 +36,8 @@
RSTiffIfd *rs_tiff_ifd_new(RSTiff *tiff, guint offset);
+guint rs_tiff_ifd_get_next(RSTiffIfd *ifd);
+
RSTiffIfdEntry *rs_tiff_ifd_get_entry_by_tag(RSTiffIfd *ifd, gushort tag);
G_END_DECLS
Modified: branches/rawstudio-ng-color/librawstudio/rs-tiff.c
===================================================================
--- branches/rawstudio-ng-color/librawstudio/rs-tiff.c 2010-01-27 08:32:06 UTC
(rev 3089)
+++ branches/rawstudio-ng-color/librawstudio/rs-tiff.c 2010-01-27 08:37:28 UTC
(rev 3090)
@@ -124,12 +124,6 @@
return TRUE;
}
-static RSTiff *
-rs_tiff_new(void)
-{
- return g_object_new(RS_TYPE_TIFF, NULL);
-}
-
static gboolean
read_from_file(RSTiff *tiff)
{
@@ -196,7 +190,7 @@
if (entry && entry->type && entry->count)
{
if ((entry->value_offset + entry->count) < tiff->map_length)
- ret = g_strndup(tiff->map + entry->value_offset ,
entry->count);
+ ret = g_strndup((gchar *) tiff->map +
entry->value_offset , entry->count);
}
return ret;
Modified: branches/rawstudio-ng-color/librawstudio/rs-utils.c
===================================================================
--- branches/rawstudio-ng-color/librawstudio/rs-utils.c 2010-01-27 08:32:06 UTC
(rev 3089)
+++ branches/rawstudio-ng-color/librawstudio/rs-utils.c 2010-01-27 08:37:28 UTC
(rev 3090)
@@ -635,7 +635,7 @@
length = 1024;
}
- gchar buffer[length];
+ guchar buffer[length];
lseek(fd, offset, SEEK_SET);
gint bytes_read = read(fd, buffer, length);
_______________________________________________
Rawstudio-commit mailing list
[email protected]
http://rawstudio.org/cgi-bin/mailman/listinfo/rawstudio-commit