summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars-Dominik Braun <lars@6xq.net>2015-02-13 18:19:58 +0100
committerLars-Dominik Braun <lars@6xq.net>2015-05-02 21:36:45 +0200
commitdbc44a2d45153760ee710f4ebcbd09f9ac196fea (patch)
tree519ce5e7ddd697c8102a83ce3bb2a32886dccc5f
parent6527e433b6856995a356e0fc0dfa5ef7816bb60f (diff)
downloadpucket-dbc44a2d45153760ee710f4ebcbd09f9ac196fea.tar.gz
pucket-dbc44a2d45153760ee710f4ebcbd09f9ac196fea.tar.bz2
pucket-dbc44a2d45153760ee710f4ebcbd09f9ac196fea.zip
Remove unused variables, fix compiler warnings
-rw-r--r--filters.c2
-rw-r--r--flam3-genome.c3
-rw-r--r--flam3.c5
-rw-r--r--parser.c13
-rw-r--r--rect.c2
-rw-r--r--variations.c5
-rw-r--r--wscript1
7 files changed, 11 insertions, 20 deletions
diff --git a/filters.c b/filters.c
index 00e5122..8bb9aa4 100644
--- a/filters.c
+++ b/filters.c
@@ -17,6 +17,7 @@
*/
#include <math.h>
+#include <assert.h>
#include "filters.h"
@@ -201,6 +202,7 @@ double flam3_spatial_filter(int knum, double x) {
return flam3_lanczos2_filter(x)*flam3_sinc(x/2.0);
else if (knum==13)
return flam3_quadratic_filter(x);
+ assert (0);
}
int normalize_vector(double *v, int n) {
diff --git a/flam3-genome.c b/flam3-genome.c
index a525a93..2ba04d1 100644
--- a/flam3-genome.c
+++ b/flam3-genome.c
@@ -667,7 +667,7 @@ main(argc, argv)
if (sequence) {
- double blend, spread;
+ double blend;
int seqflag;
int framecount;
@@ -679,7 +679,6 @@ main(argc, argv)
cp = string_to_cp(sequence, &ncp, &rc);
if (enclosed) printf("<sequence version=\"FLAM3-%s\">\n", flam3_version());
- spread = 1.0/nframes;
framecount = 0;
#if 1
for (i = 0; i < ncp; i++) {
diff --git a/flam3.c b/flam3.c
index a23131f..11e04e0 100644
--- a/flam3.c
+++ b/flam3.c
@@ -1442,7 +1442,6 @@ char *flam3_print_to_string(flam3_genome *cp) {
char *genome_string;
int using_tmpdir = 0;
- char *tmp_path;
char tmpnam[256];
tmpflame = tmpfile();
@@ -2378,7 +2377,7 @@ void add_to_action(char *action, char *addtoaction) {
void flam3_cross(flam3_genome *cp0, flam3_genome *cp1, flam3_genome *out, int cross_mode, randctx *rc, char *action) {
- int i0,i1, i,j, rb;
+ int i,j, rb;
char ministr[10];
if (cross_mode == CROSS_NOT_SPECIFIED) {
@@ -2784,7 +2783,7 @@ void flam3_mutate(flam3_genome *cp, int mutate_mode, int *ivars, int ivars_n, in
void flam3_random(flam3_genome *cp, int *ivars, int ivars_n, int sym, int spec_xforms, randctx * const rc) {
- int i, j, nxforms, var, samed, multid, samepost, postid, addfinal=0;
+ int i, nxforms, var, samed, multid, samepost, postid, addfinal=0;
int finum = -1;
int n;
char *ai;
diff --git a/parser.c b/parser.c
index b1882b9..1952dec 100644
--- a/parser.c
+++ b/parser.c
@@ -291,7 +291,7 @@ int parse_flame_element(xmlNode *flame_node, flam3_genome *loc_current_cp,
char *att_str;
int num_std_xforms=-1;
char tmps[2];
- int i,j;
+ int i;
flam3_xform tmpcpy;
flam3_chaos_entry *xaos=NULL;
int num_xaos=0;
@@ -551,7 +551,7 @@ int parse_flame_element(xmlNode *flame_node, flam3_genome *loc_current_cp,
}
} else if (!xmlStrcmp(chld_node->name, (const xmlChar *)"colors")) {
- int count;
+ int count = 0;
/* Loop through the attributes of the colors element */
att_ptr = chld_node->properties;
@@ -1252,7 +1252,7 @@ void flam3_edit_print(FILE *f, xmlNodePtr editNode, int tabs, int formatting) {
int ti,strl;
xmlAttrPtr att_ptr=NULL,cur_att=NULL;
xmlNodePtr chld_ptr=NULL, cur_chld=NULL;
- int edit_or_sheep = 0, indent_printed = 0;
+ int indent_printed = 0;
char *ai;
int tablim = argi("print_edit_depth",0);
@@ -1275,13 +1275,8 @@ void flam3_edit_print(FILE *f, xmlNodePtr editNode, int tabs, int formatting) {
/* This can either be an edit node or a sheep node */
/* If it's an edit node, add one to the tab */
if (!xmlStrcmp(editNode->name, (const xmlChar *)"edit")) {
- edit_or_sheep = 1;
tabs ++;
- } else if (!xmlStrcmp(editNode->name, (const xmlChar *)"sheep"))
- edit_or_sheep = 2;
- else
- edit_or_sheep = 0;
-
+ }
/* Print the attributes */
att_ptr = editNode->properties;
diff --git a/rect.c b/rect.c
index a9bda80..5a4482b 100644
--- a/rect.c
+++ b/rect.c
@@ -494,7 +494,6 @@ static int render_rectangle(flam3_frame *spec, void *out,
flam3_thread_helper *fth;
pthread_attr_t pt_attr;
pthread_t *myThreads=NULL;
- int thread_status;
int thi;
time_t tstart,tend;
double sumfilt;
@@ -791,7 +790,6 @@ static int render_rectangle(flam3_frame *spec, void *out,
/* Initialize the thread helper structures */
for (thi = 0; thi < spec->nthreads; thi++) {
- int rk;
/* Create a new state for this thread */
rand_seed (&fth[thi].rc);
diff --git a/variations.c b/variations.c
index 7c9d8c3..fe4f6b9 100644
--- a/variations.c
+++ b/variations.c
@@ -1824,9 +1824,6 @@ static double2 var97_flux (const double2 in, const flam3_iter_helper * const f,
double avgr = weight * (2 + f->xform->flux_spread) * sqrt( sqrt(in[1]*in[1] + xpw*xpw) / sqrt(in[1]*in[1] + xmw*xmw));
double avga = ( atan2(in[1], xmw) - atan2(in[1],xpw) ) * 0.5;
- double s = sin(avga);
- double c = cos(avga);
-
return avgr * (double2) { cos(avga), sin(avga) };
}
@@ -2046,7 +2043,7 @@ int apply_xform(flam3_genome *cp, int fn, const double4 p, double4 *q_ret, randc
{
flam3_iter_helper f;
int var_n;
- double next_color,s,s1;
+ double s1;
double weight;
f.rc = rc;
diff --git a/wscript b/wscript
index ce03849..61459f7 100644
--- a/wscript
+++ b/wscript
@@ -6,6 +6,7 @@ def configure(conf):
conf.load ('compiler_c')
conf.env.append_unique ('CFLAGS', '-std=gnu99')
+ conf.env.append_unique ('CFLAGS', '-D_GNU_SOURCE')
conf.check_cfg (path='xml2-config', args='--cflags --libs', package='', uselib_store='xml2')
conf.check_cc (lib='xml2', header_name='libxml/parser.h', function_name='xmlParseFile', use='xml2')