Merge pull request #8 from colindean/silence-warnings

Silences a few build warnings
This commit is contained in:
Colin Dean 2018-04-08 12:07:32 -04:00 committed by GitHub
commit 94badc9693
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 14 additions and 7 deletions

View File

@ -1,7 +1,14 @@
CC?=gcc
LDFLAGS=-lm
CFLAGS=-O3 -Wall -Wuninitialized -fomit-frame-pointer -funroll-loops \
-fstrength-reduce -DNODEBUG `libpng-config --I_opts`
ifeq ($(CC), gcc)
SPECIFIC_CFLAGS=-fstrength-reduce
else
SPECIFIC_CFLAGS=
endif
CFLAGS=-O3 -Wall -Wuninitialized \
-fomit-frame-pointer -funroll-loops \
$(SPECIFIC_CFLAGS) \
-DNODEBUG `libpng-config --I_opts`
all: optar unoptar

2
font.h
View File

@ -269,7 +269,7 @@ static char header_data_cmap[256][3] = {
{255,255,255},
{255,255,255}
};
static char header_data[] = {
static char header_data[36000] = {
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,

View File

@ -16,7 +16,7 @@
#define HEIGHT (2*BORDER+DATA_HEIGHT+TEXT_HEIGHT)
#define TEXT_HEIGHT 24
static unsigned char ary[WIDTH*HEIGHT];
static unsigned char ary[WIDTH * HEIGHT];
static unsigned char *file_label=(unsigned char *)""; /* The filename written in the
file_label */
static char *output_filename; /* The output filename */
@ -109,7 +109,7 @@ void border(void)
memset(ptr,0,BORDER*WIDTH);
}
void cross(x,y)
void cross(int x, int y)
{
unsigned char *ptr=ary+y*WIDTH+x;
unsigned c;
@ -132,7 +132,7 @@ void crosses(void)
}
/* x is in the range 0 to DATA_WIDTH-1 */
void text_block (destx, srcx, width)
void text_block (int destx, int srcx, int width)
{
int x, y;
unsigned char *srcptr;

View File

@ -316,7 +316,7 @@ static double angle(double x, double y)
{
double deg;
if (abs(x)>abs(y)){
if (fabs(x)>fabs(y)){
/* Horizontal */
deg=180/M_PI*asin(y);
if (x<0) deg=180-deg;