Skip to content

Commit

Permalink
Warnings--
Browse files Browse the repository at this point in the history
  • Loading branch information
kornelski committed Jan 23, 2012
1 parent 3c2d720 commit 0cc8d9b
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ CUSTOMZLIB ?= ../zlib

CFLAGSOPT ?= -O3 -fearly-inlining -fstrict-aliasing -ffast-math -funroll-loops -fomit-frame-pointer -fexpensive-optimizations -ffinite-math-only -funsafe-loop-optimizations -ftree-vectorize

CFLAGS ?= -DNDEBUG -Wall -I. -I$(CUSTOMLIBPNG) -I$(CUSTOMZLIB) -I/usr/local/include/ -I/usr/include/ -I/usr/X11/include/ $(CFLAGSOPT)
CFLAGS ?= -DNDEBUG -Wall -Wno-unknown-pragmas -I. -I$(CUSTOMLIBPNG) -I$(CUSTOMZLIB) -I/usr/local/include/ -I/usr/include/ -I/usr/X11/include/ $(CFLAGSOPT)
CFLAGS += -std=c99 $(CFLAGSADD)

LDFLAGS ?= -L$(CUSTOMLIBPNG) -L$(CUSTOMZLIB) -L/usr/local/lib/ -L/usr/lib/ -L/usr/X11/lib/
Expand Down
20 changes: 10 additions & 10 deletions mediancut.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ typedef struct {

static int comparevariance(const void *ch1, const void *ch2)
{
return ((channelvariance*)ch1)->variance > ((channelvariance*)ch2)->variance ? -1 :
(((channelvariance*)ch1)->variance < ((channelvariance*)ch2)->variance ? 1 : 0);
return ((const channelvariance*)ch1)->variance > ((const channelvariance*)ch2)->variance ? -1 :
(((const channelvariance*)ch1)->variance < ((const channelvariance*)ch2)->variance ? 1 : 0);
}

static channelvariance channel_sort_order[4];
Expand All @@ -61,8 +61,8 @@ inline static int weightedcompare_other(const float *restrict c1p, const float *
/** these are specialised functions to make first comparison faster without lookup in channel_sort_order[] */
static int weightedcompare_r(const void *ch1, const void *ch2)
{
const float *c1p = (const float *)&((hist_item*)ch1)->acolor;
const float *c2p = (const float *)&((hist_item*)ch2)->acolor;
const float *c1p = (const float *)&((const hist_item*)ch1)->acolor;
const float *c2p = (const float *)&((const hist_item*)ch2)->acolor;

if (c1p[index_of_channel(r)] > c2p[index_of_channel(r)]) return 1;
if (c1p[index_of_channel(r)] < c2p[index_of_channel(r)]) return -1;
Expand All @@ -72,8 +72,8 @@ static int weightedcompare_r(const void *ch1, const void *ch2)

static int weightedcompare_g(const void *ch1, const void *ch2)
{
const float *c1p = (const float *)&((hist_item*)ch1)->acolor;
const float *c2p = (const float *)&((hist_item*)ch2)->acolor;
const float *c1p = (const float *)&((const hist_item*)ch1)->acolor;
const float *c2p = (const float *)&((const hist_item*)ch2)->acolor;

if (c1p[index_of_channel(g)] > c2p[index_of_channel(g)]) return 1;
if (c1p[index_of_channel(g)] < c2p[index_of_channel(g)]) return -1;
Expand All @@ -83,8 +83,8 @@ static int weightedcompare_g(const void *ch1, const void *ch2)

static int weightedcompare_b(const void *ch1, const void *ch2)
{
const float *c1p = (const float *)&((hist_item*)ch1)->acolor;
const float *c2p = (const float *)&((hist_item*)ch2)->acolor;
const float *c1p = (const float *)&((const hist_item*)ch1)->acolor;
const float *c2p = (const float *)&((const hist_item*)ch2)->acolor;

if (c1p[index_of_channel(b)] > c2p[index_of_channel(b)]) return 1;
if (c1p[index_of_channel(b)] < c2p[index_of_channel(b)]) return -1;
Expand All @@ -94,8 +94,8 @@ static int weightedcompare_b(const void *ch1, const void *ch2)

static int weightedcompare_a(const void *ch1, const void *ch2)
{
const float *c1p = (const float *)&((hist_item*)ch1)->acolor;
const float *c2p = (const float *)&((hist_item*)ch2)->acolor;
const float *c1p = (const float *)&((const hist_item*)ch1)->acolor;
const float *c2p = (const float *)&((const hist_item*)ch2)->acolor;

if (c1p[index_of_channel(a)] > c2p[index_of_channel(a)]) return 1;
if (c1p[index_of_channel(a)] < c2p[index_of_channel(a)]) return -1;
Expand Down
4 changes: 2 additions & 2 deletions nearest.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ struct nearest_map {

static int compareradius(const void *ap, const void *bp)
{
float a = ((struct sorttmp*)ap)->radius;
float b = ((struct sorttmp*)bp)->radius;
float a = ((const struct sorttmp*)ap)->radius;
float b = ((const struct sorttmp*)bp)->radius;
return a > b ? 1 : (a < b ? -1 : 0);
}

Expand Down

0 comments on commit 0cc8d9b

Please sign in to comment.