mirror of
git://projects.qi-hardware.com/cae-tools.git
synced 2024-12-23 03:59:00 +02:00
Enable more compiler warnings. Some cleanup.
- cameo/Makefile (CFLAGS): added more warning flags - cameo/path.h (path_direction): removed unused prototype - cameo/path.c (angle): renamed to angle_3 to keep it from getting shadowed by local variable
This commit is contained in:
parent
5c9e7d5e52
commit
d465acbeb5
@ -17,7 +17,9 @@ SHELL=/bin/bash
|
||||
MAIN=cameo
|
||||
OBJS=cameo.o gnuplot.o path.o
|
||||
|
||||
CFLAGS=-Wall -g
|
||||
CFLAGS_WARN=-Wall -Wshadow -Wmissing-prototypes \
|
||||
-Wmissing-declarations -Wno-format-zero-length
|
||||
CFLAGS=$(CFLAGS_WARN) -g
|
||||
LDFLAGS=-lm
|
||||
|
||||
# ----- Verbosity control -----------------------------------------------------
|
||||
|
@ -162,7 +162,7 @@ static int left_turn(const struct point *a, const struct point *b,
|
||||
* in order to face towards C.
|
||||
*/
|
||||
|
||||
static double angle(const struct point *a, const struct point *b,
|
||||
static double angle_3(const struct point *a, const struct point *b,
|
||||
const struct point *c)
|
||||
{
|
||||
double ax, ay, bx, by;
|
||||
@ -197,7 +197,7 @@ int path_tool_is_left(const struct path *path)
|
||||
prev = path->first;
|
||||
for (p = path->first->next; p; p = p->next) {
|
||||
next = p->next ? p->next : path->first->next;
|
||||
a += angle(prev, p, next);
|
||||
a += angle_3(prev, p, next);
|
||||
prev = p;
|
||||
}
|
||||
return a < 0;
|
||||
|
@ -30,7 +30,6 @@ struct path {
|
||||
struct path *path_new(double r_tool);
|
||||
void path_add(struct path *path, double x, double y, double z);
|
||||
struct path *path_reverse(const struct path *path);
|
||||
int path_direction(const struct path *path);
|
||||
int path_tool_is_left(const struct path *path);
|
||||
struct path *path_offset(const struct path *path, int left, int notch);
|
||||
void path_free(struct path *path);
|
||||
|
Loading…
Reference in New Issue
Block a user