got rid of compile warnings, added -Wall to AM_CFLAGS for now

This commit is contained in:
osboxes.org 2015-03-09 09:07:49 -06:00
parent 42c050c29f
commit efe4a24b7e
13 changed files with 25 additions and 36 deletions

View File

@ -1,7 +1,7 @@
AUTOMAKE_OPTIONS = foreign no-dependencies
SVN_DEF = -D'SVN_REV="$(shell svnversion -n .)"'
AM_CFLAGS = -g -O2 -finline-functions -funswitch-loops -fpredictive-commoning -fgcse-after-reload -fvect-cost-model -ftree-partial-pre -fipa-cp-clone -std=gnu99 -ffast-math -DPACKAGE_DATA_DIR=\"$(pkgdatadir)\" $(SVN_DEF)
AM_CFLAGS = -g -O2 -Wall -finline-functions -funswitch-loops -fpredictive-commoning -fgcse-after-reload -fvect-cost-model -ftree-partial-pre -fipa-cp-clone -std=gnu99 -ffast-math -DPACKAGE_DATA_DIR=\"$(pkgdatadir)\" $(SVN_DEF)
ACLOCAL_AMFLAGS = -I m4

View File

@ -360,7 +360,7 @@ top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AUTOMAKE_OPTIONS = foreign no-dependencies
SVN_DEF = -D'SVN_REV="$(shell svnversion -n .)"'
AM_CFLAGS = -g -O2 -finline-functions -funswitch-loops -fpredictive-commoning -fgcse-after-reload -fvect-cost-model -ftree-partial-pre -fipa-cp-clone -std=gnu99 -ffast-math -DPACKAGE_DATA_DIR=\"$(pkgdatadir)\" $(SVN_DEF)
AM_CFLAGS = -g -O2 -Wall -finline-functions -funswitch-loops -fpredictive-commoning -fgcse-after-reload -fvect-cost-model -ftree-partial-pre -fipa-cp-clone -std=gnu99 -ffast-math -DPACKAGE_DATA_DIR=\"$(pkgdatadir)\" $(SVN_DEF)
ACLOCAL_AMFLAGS = -I m4
man1_MANS = flam3-animate.man flam3-genome.man flam3-render.man flam3-convert.man
lib_LTLIBRARIES = libflam3.la

View File

@ -197,7 +197,7 @@ double flam3_spatial_filter(int knum, double x) {
return flam3_lanczos3_filter(x)*flam3_sinc(x/3.0);
else if (knum==12)
return flam3_lanczos2_filter(x)*flam3_sinc(x/2.0);
else if (knum==13)
else // if (knum==13)
return flam3_quadratic_filter(x);
}

View File

@ -71,9 +71,9 @@ void tokenize(ss, argv, argc)
void parse_control_point_old(char **ss, flam3_genome *cp) {
char *argv[MAXARGS];
int argc, i, j;
int set_cm = 0, set_image_size = 0, set_nbatches = 0, set_white_level = 0, set_cmap_inter = 0;
int set_cm = 0, set_image_size = 0, set_nbatches = 0, set_white_level = 0;
int set_spatial_oversample = 0, set_hr = 0;
double *slot, xf, cm, t, nbatches, white_level, spatial_oversample, cmap_inter;
double *slot = NULL, xf, cm, t, nbatches, white_level, spatial_oversample, cmap_inter;
double image_size[2];
memset(cp, 0, sizeof(flam3_genome));
@ -153,7 +153,6 @@ void parse_control_point_old(char **ss, flam3_genome *cp) {
slot = cp->xform[(int)xf].var;
else if (streql("cmap_inter", argv[i])) {
slot = &cmap_inter;
set_cmap_inter = 1;
} else
*slot++ = atof(argv[i]);
}

View File

@ -383,7 +383,6 @@ static void print_find_parents(xmlNode *node, int last, int level) {
xmlAttrPtr att_ptr, cur_att;
xmlNodePtr chld_ptr=NULL, cur_chld=NULL;
xmlNode *this_node;
int i;
int next_last;
//for (i = 0; i < level; i++)
// fprintf(stdout, "+");
@ -748,7 +747,7 @@ main(argc, argv)
if (sequence) {
double blend, spread;
double blend;
int seqflag;
int framecount;
@ -760,7 +759,6 @@ main(argc, argv)
cp = string_to_cp(sequence, &ncp, flam3_defaults_on);
if (enclosed) printf("<sequence version=\"FLAM3-%s\">\n", flam3_version());
spread = 1.0/nframes;
framecount = 0;
#if 1
for (i = 0; i < ncp; i++) {

View File

@ -118,7 +118,7 @@ int main(int argc, char **argv) {
double imgmem;
unsigned int strip;
double center_y, center_base;
unsigned int nstrips;
unsigned int nstrips = 1;
randctx savectx;
char *prefix = args("prefix", "");
char *out = args("out", NULL);
@ -126,7 +126,6 @@ int main(int argc, char **argv) {
int verbose = argi("verbose", 1);
int bits = argi("bits", 33);
int bpc = argi("bpc",8);
int seed = argi("seed", 0);
int transparency = argi("transparency", 0);
char *inf = getenv("in");
double qs = argf("qs", 1.0);
@ -249,7 +248,6 @@ int main(int argc, char **argv) {
"to one file. all but last will be lost.\n");
}
for (i = 0; i < ncps; i++) {
int real_height;

View File

@ -1628,7 +1628,6 @@ char *flam3_print_to_string(flam3_genome *cp) {
char *genome_string;
int using_tmpdir = 0;
char *tmp_path;
char tmpnam[256];
tmpflame = tmpfile();
@ -2650,7 +2649,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) {
@ -3064,7 +3063,7 @@ static int random_varn(int n) {
void flam3_random(flam3_genome *cp, int *ivars, int ivars_n, int sym, int spec_xforms) {
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;

View File

@ -513,7 +513,7 @@ void flam3_interpolate_n(flam3_genome *result, int ncp,
/* Interpolate each xform */
for (i = 0; i < cpi[0].num_xforms; i++) {
double csave[2];
double csave[2] = {0, 0};
double td;
int all_id;
int nx = cpi[0].num_xforms-(cpi[0].final_xform_index>=0);

3
jpeg.c
View File

@ -102,7 +102,6 @@ write_jpeg(FILE *file, unsigned char *image, int width, int height, flam3_img_co
unsigned char *read_jpeg(FILE *ifp, int *width, int *height) {
struct jpeg_decompress_struct cinfo;
struct jpeg_error_mgr jerr;
int num_scanlines;
unsigned char *p, *q, *t;
cinfo.err = jpeg_std_error(&jerr);
@ -126,7 +125,7 @@ unsigned char *read_jpeg(FILE *ifp, int *width, int *height) {
while (cinfo.output_scanline < cinfo.output_height) {
unsigned char *s = t;
int i;
num_scanlines = jpeg_read_scanlines(&cinfo, &t, 1);
jpeg_read_scanlines(&cinfo, &t, 1);
for (i = 0; i < *width; i++) {
p[0] = s[0];
p[1] = s[1];

View File

@ -86,7 +86,7 @@ NM="/usr/bin/nm -B"
LN_S="ln -s"
# What is the maximum length of a command?
max_cmd_len=1572864
max_cmd_len=3458764513820540925
# Object file suffix (normally "o").
objext=o

View File

@ -26,7 +26,7 @@ static void parse_palettes(xmlNode *node) {
xmlAttrPtr attr;
char *val;
lib_palette *pal;
int hex_error;
int hex_error = 0;
while (node) {
if (node->type == XML_ELEMENT_NODE && !xmlStrcmp(node->name, (const xmlChar *)"palette")) {

View File

@ -143,6 +143,7 @@ int flam3_interp_missing_colors(flam3_genome *cp) {
int i,j,k;
double prcr;
minix = 0;
for (i=0; i<256; i++) {
if (cp->palette[i].index >= 0) {
minix = i;
@ -159,6 +160,7 @@ int flam3_interp_missing_colors(flam3_genome *cp) {
wrapmin = minix + 256;
maxix = 255;
for (i=255;i>=0;i--) {
if (cp->palette[i].index >= 0) {
maxix = i;
@ -176,7 +178,9 @@ int flam3_interp_missing_colors(flam3_genome *cp) {
/* Start of a range of negs */
str = i;
intl = i-1;
intr = i+1;
colorli = intl;
colorri = intr;
while (cp->palette[i].index<0 && i<256) {
enr = i;
intr = i+1;
@ -290,7 +294,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;
@ -554,7 +558,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;
@ -1255,7 +1259,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);
@ -1278,13 +1282,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;

View File

@ -1916,9 +1916,6 @@ void var97_flux (flam3_iter_helper *f, double weight) {
double avgr = weight * (2 + f->xform->flux_spread) * sqrt( sqrt(f->ty*f->ty + xpw*xpw) / sqrt(f->ty*f->ty + xmw*xmw));
double avga = ( atan2(f->ty, xmw) - atan2(f->ty,xpw) ) * 0.5;
double s = sin(avga);
double c = cos(avga);
f->p0 += avgr * cos(avga);
f->p1 += avgr * sin(avga);
}
@ -2133,7 +2130,7 @@ int apply_xform(flam3_genome *cp, int fn, double *p, double *q, randctx *rc)
{
flam3_iter_helper f;
int var_n;
double next_color,s,s1;
double s1;
double weight;
f.rc = rc;