Skip to content

Commit

Permalink
Merge pull request dyne#69 from rrrapha/unused-variable
Browse files Browse the repository at this point in the history
Remove unused variables
  • Loading branch information
jaromil authored Dec 30, 2018
2 parents ac78c7f + f1fd394 commit e6057ed
Show file tree
Hide file tree
Showing 14 changed files with 7 additions and 41 deletions.
8 changes: 2 additions & 6 deletions src/filter/alpha0ps/alphagrad.c
Original file line number Diff line number Diff line change
Expand Up @@ -256,8 +256,6 @@ fill_grad(p);
void f0r_get_param_value(f0r_instance_t instance, f0r_param_t param, int param_index)
{
inst *p;
double tmpf;
int tmpi;

p=(inst*)instance;

Expand Down Expand Up @@ -289,9 +287,7 @@ switch(param_index)
void f0r_update(f0r_instance_t instance, double time, const uint32_t* inframe, uint32_t* outframe)
{
inst *in;
int i,j;
float a,d,st,ct;
float po,wd;
int i;
uint32_t t;

assert(instance);
Expand Down Expand Up @@ -337,4 +333,4 @@ switch (in->op)
}
}

//**********************************************************
//**********************************************************
7 changes: 2 additions & 5 deletions src/filter/alpha0ps/alphaspot.c
Original file line number Diff line number Diff line change
Expand Up @@ -447,8 +447,6 @@ draw(p);
void f0r_get_param_value(f0r_instance_t instance, f0r_param_t param, int param_index)
{
inst *p;
double tmpf;
int tmpi;

p=(inst*)instance;

Expand Down Expand Up @@ -491,8 +489,7 @@ switch(param_index)
void f0r_update(f0r_instance_t instance, double time, const uint32_t* inframe, uint32_t* outframe)
{
inst *in;
int i,j;
float a,d,st,ct;
int i;
uint32_t t;

assert(instance);
Expand Down Expand Up @@ -538,4 +535,4 @@ switch (in->op)
}
}

//**********************************************************
//**********************************************************
2 changes: 0 additions & 2 deletions src/filter/bgsubtract0r/bgsubtract0r.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ void f0r_set_param_value(f0r_instance_t instance, f0r_param_t param, int param_i
{
assert(instance);
bgsubtract0r_instance_t* inst = (bgsubtract0r_instance_t*)instance;
f0r_param_color_t *c;

switch(param_index)
{
Expand All @@ -148,7 +147,6 @@ void f0r_get_param_value(f0r_instance_t instance, f0r_param_t param, int param_i
{
assert(instance);
bgsubtract0r_instance_t* inst = (bgsubtract0r_instance_t*)instance;
f0r_param_color_t *c;

switch(param_index)
{
Expand Down
2 changes: 1 addition & 1 deletion src/filter/c0rners/c0rners.c
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ void make_alphamap(unsigned char *amap, tocka2 vog[], int wo, int ho, float *map
//-------------------------------------------------------
void apply_alphamap(uint32_t* frame, int w, int h, unsigned char *amap, int operation)
{
int i,j, length;
int i, length;
uint32_t t;
length = w * h;

Expand Down
1 change: 0 additions & 1 deletion src/filter/cairoimagegrid/cairoimagegrid.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ f0r_instance_t f0r_construct(unsigned int width, unsigned int height)

void f0r_destruct(f0r_instance_t instance)
{
cairo_imagegrid_instance_t* inst = (cairo_imagegrid_instance_t*)instance;
free(instance);
}

Expand Down
2 changes: 0 additions & 2 deletions src/filter/coloradj/coloradj_RGB.c
Original file line number Diff line number Diff line change
Expand Up @@ -466,8 +466,6 @@ switch(p->act)
void f0r_get_param_value(f0r_instance_t instance, f0r_param_t param, int param_index)
{
inst *p;
double tmpf;
int tmpi;

p=(inst*)instance;

Expand Down
2 changes: 1 addition & 1 deletion src/filter/colorhalftone/colorhalftone.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ void color_halftone(f0r_instance_t instance, double time,

const uint32_t* inPixels = (const uint32_t*)inframe;
uint32_t* dst = outframe;
int x, y, ix, channel, v, nr, shift, mask, i, nx, argb, ny;
int x, y, channel, v, nr, shift, mask, i, nx, argb, ny;

double angle, sin_val, cos_val, tx, ty , ttx, tty, ntx, nty, l, dx , dy , dx2 , dy2 , R , f, f2;

Expand Down
1 change: 0 additions & 1 deletion src/filter/curves/curves.c
Original file line number Diff line number Diff line change
Expand Up @@ -949,7 +949,6 @@ void f0r_update(f0r_instance_t instance, double time,
free(points);
//drawing curve on the graph
float halfLineWidth = lineWidth * .5;
float coeff = 255. / scale;
float prevY = 0;
for(int j = 0; j < scale; j++) {
float y = inst->curveMap[j];
Expand Down
2 changes: 0 additions & 2 deletions src/filter/defish0r/defish0r.c
Original file line number Diff line number Diff line change
Expand Up @@ -640,8 +640,6 @@ void f0r_get_param_value(f0r_instance_t instance, f0r_param_t parm, int param_in
void f0r_update(f0r_instance_t instance, double time, const uint32_t* inframe, uint32_t* outframe)
{
param *p;
int size;
int i,j;

p=(param*)instance;

Expand Down
2 changes: 0 additions & 2 deletions src/filter/levels/levels.c
Original file line number Diff line number Diff line change
Expand Up @@ -309,8 +309,6 @@ void f0r_update(f0r_instance_t instance, double time,
int posInMax = inst->inputMax * thirdX;
int posOutMin = inst->outputMin * thirdX;
int posOutMax = inst->outputMax * thirdX;
double b = -7.0/12;
double a = .5 - b;
int posGamma = posInMin + (posInMax - posInMin) * pow(inst->gamma, .5) *.5;
int color[3];
color[0] = CHANNEL_RED == inst->channel || CHANNEL_LUMA == inst->channel?255:0;
Expand Down
3 changes: 1 addition & 2 deletions src/filter/lightgraffiti/lightgraffiti.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -361,8 +361,7 @@ class LightGraffiti : public frei0r::filter
int maxDiff, temp, sum;
unsigned int min;
unsigned int max;
float f, y;
uint32_t color;
float f;
float fr, fg, fb, sr, sg, sb, fy, fsat;

#ifdef LG_DEBUG
Expand Down
7 changes: 0 additions & 7 deletions src/filter/measure/pr0be.c
Original file line number Diff line number Diff line change
Expand Up @@ -641,9 +641,7 @@ free(instance);
void f0r_set_param_value(f0r_instance_t instance, f0r_param_t parm, int param_index)
{
inst *p;
double tmpf;
int tmpi,chg;
float l;

p=(inst*)instance;

Expand Down Expand Up @@ -700,8 +698,6 @@ if (chg==0) return;
void f0r_get_param_value(f0r_instance_t instance, f0r_param_t param, int param_index)
{
inst *p;
double tmpf;
int tmpi;

p=(inst*)instance;

Expand Down Expand Up @@ -738,9 +734,6 @@ switch(param_index)
void f0r_update(f0r_instance_t instance, double time, const uint32_t* inframe, uint32_t* outframe)
{
inst *in;
float l;
unsigned char lc;
int i;

assert(instance);
in=(inst*)instance;
Expand Down
5 changes: 0 additions & 5 deletions src/filter/measure/pr0file.c
Original file line number Diff line number Diff line change
Expand Up @@ -950,8 +950,6 @@ p->dit=p->dit+256*p->dmax;
void f0r_get_param_value(f0r_instance_t instance, f0r_param_t param, int param_index)
{
inst *p;
double tmpf;
int tmpi;

p=(inst*)instance;

Expand Down Expand Up @@ -1027,9 +1025,6 @@ switch(param_index)
void f0r_update(f0r_instance_t instance, double time, const uint32_t* inframe, uint32_t* outframe)
{
inst *in;
float l;
unsigned char lc;
int i;

assert(instance);
in=(inst*)instance;
Expand Down
4 changes: 0 additions & 4 deletions src/filter/three_point_balance/three_point_balance.c
Original file line number Diff line number Diff line change
Expand Up @@ -226,11 +226,9 @@ void f0r_update(f0r_instance_t instance, double time,
{
assert(instance);
three_point_balance_instance_t* inst = (three_point_balance_instance_t*)instance;
unsigned int len = inst->width * inst->height;

unsigned char* dst = (unsigned char*)outframe;
const unsigned char* src = (unsigned char*)inframe;
int b, g, r;

int mapRed[256];
int mapGreen[256];
Expand All @@ -255,8 +253,6 @@ void f0r_update(f0r_instance_t instance, double time,
free(redCoeffs);
free(greenCoeffs);
free(blueCoeffs);
int minX = inst->splitPreview && inst->srcPosition?inst->width/2:0;
int maxX = inst->splitPreview && !inst->srcPosition?inst->width/2:inst->width;

for(int j = 0; j < inst->width; j++) {
int copyPixel = inst->splitPreview && ((inst->srcPosition && j < inst->width / 2) || (!inst->srcPosition && j >= inst->width / 2));
Expand Down

0 comments on commit e6057ed

Please sign in to comment.