mirror of
git://projects.qi-hardware.com/cae-tools.git
synced 2024-12-23 08:25:31 +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
|
MAIN=cameo
|
||||||
OBJS=cameo.o gnuplot.o path.o
|
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
|
LDFLAGS=-lm
|
||||||
|
|
||||||
# ----- Verbosity control -----------------------------------------------------
|
# ----- Verbosity control -----------------------------------------------------
|
||||||
|
@ -162,7 +162,7 @@ static int left_turn(const struct point *a, const struct point *b,
|
|||||||
* in order to face towards C.
|
* 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)
|
const struct point *c)
|
||||||
{
|
{
|
||||||
double ax, ay, bx, by;
|
double ax, ay, bx, by;
|
||||||
@ -197,7 +197,7 @@ int path_tool_is_left(const struct path *path)
|
|||||||
prev = path->first;
|
prev = path->first;
|
||||||
for (p = path->first->next; p; p = p->next) {
|
for (p = path->first->next; p; p = p->next) {
|
||||||
next = p->next ? p->next : path->first->next;
|
next = p->next ? p->next : path->first->next;
|
||||||
a += angle(prev, p, next);
|
a += angle_3(prev, p, next);
|
||||||
prev = p;
|
prev = p;
|
||||||
}
|
}
|
||||||
return a < 0;
|
return a < 0;
|
||||||
|
@ -30,7 +30,6 @@ struct path {
|
|||||||
struct path *path_new(double r_tool);
|
struct path *path_new(double r_tool);
|
||||||
void path_add(struct path *path, double x, double y, double z);
|
void path_add(struct path *path, double x, double y, double z);
|
||||||
struct path *path_reverse(const struct path *path);
|
struct path *path_reverse(const struct path *path);
|
||||||
int path_direction(const struct path *path);
|
|
||||||
int path_tool_is_left(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);
|
struct path *path_offset(const struct path *path, int left, int notch);
|
||||||
void path_free(struct path *path);
|
void path_free(struct path *path);
|
||||||
|
Loading…
Reference in New Issue
Block a user