[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
gEDA-cvs: CVS update: o_arc_basic.c
User: danmc
Date: 06/12/06 23:24:18
Modified: . o_arc_basic.c o_box_basic.c o_bus_basic.c
o_circle_basic.c o_complex_basic.c o_line_basic.c
o_net_basic.c o_picture.c o_pin_basic.c
o_text_basic.c s_attrib.c s_papersizes.c
Log:
Fix a whole bunch of pointer casts which were not right. They didn't seem
to be causing failures but were causing tons of warnings. Also remove a
spurious ";" following a function definition and address some "code can't
be reached" warnings.
Revision Changes Path
1.31 +9 -11 eda/geda/gaf/libgeda/src/o_arc_basic.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: o_arc_basic.c
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/libgeda/src/o_arc_basic.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -b -r1.30 -r1.31
--- o_arc_basic.c 3 Dec 2006 02:27:13 -0000 1.30
+++ o_arc_basic.c 7 Dec 2006 04:24:18 -0000 1.31
@@ -119,10 +119,8 @@
/* new_node->graphical = arc; eventually */
- /* \todo questionable cast */
- new_node->draw_func = (void *) arc_draw_func;
- /* \todo questionable cast */
- new_node->sel_func = (void *) select_func;
+ new_node->draw_func = arc_draw_func;
+ new_node->sel_func = select_func;
/* \note
* The new object is linked to the object given in parameter object_list
@@ -881,36 +879,36 @@
switch(o_current->line_type) {
case(TYPE_SOLID):
length = -1; space = -1;
- outl_func = (void *) o_arc_print_solid;
+ outl_func = o_arc_print_solid;
break;
case(TYPE_DOTTED):
length = -1;
- outl_func = (void *) o_arc_print_dotted;
+ outl_func = o_arc_print_dotted;
break;
case(TYPE_DASHED):
- outl_func = (void *) o_arc_print_dashed;
+ outl_func = o_arc_print_dashed;
break;
case(TYPE_CENTER):
- outl_func = (void *) o_arc_print_center;
+ outl_func = o_arc_print_center;
break;
case(TYPE_PHANTOM):
- outl_func = (void *) o_arc_print_phantom;
+ outl_func = o_arc_print_phantom;
break;
case(TYPE_ERASE):
/* Unused for now, print it solid */
length = -1; space = -1;
- outl_func = (void *) o_arc_print_solid;
+ outl_func = o_arc_print_solid;
break;
}
if((space == 0) || (length == 0)) {
length = -1; space = -1;
- outl_func = (void *) o_arc_print_solid;
+ outl_func = o_arc_print_solid;
}
(*outl_func)(w_current, fp,
1.26 +14 -16 eda/geda/gaf/libgeda/src/o_box_basic.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: o_box_basic.c
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/libgeda/src/o_box_basic.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -b -r1.25 -r1.26
--- o_box_basic.c 3 Dec 2006 02:27:14 -0000 1.25
+++ o_box_basic.c 7 Dec 2006 04:24:18 -0000 1.26
@@ -119,10 +119,8 @@
o_set_fill_options(w_current, new_node,
FILLING_HOLLOW, -1, -1, -1, -1, -1);
- /* \todo questionable cast */
- new_node->draw_func = (void *) box_draw_func;
- /* \todo questionable cast */
- new_node->sel_func = (void *) select_func;
+ new_node->draw_func = box_draw_func;
+ new_node->sel_func = select_func;
/* compute the bounding box */
o_box_recalc(w_current, new_node);
@@ -907,36 +905,36 @@
switch(o_current->line_type) {
case(TYPE_SOLID):
length = -1; space = -1;
- outl_func = (void *) o_box_print_solid;
+ outl_func = o_box_print_solid;
break;
case(TYPE_DOTTED):
length = -1;
- outl_func = (void *) o_box_print_dotted;
+ outl_func = o_box_print_dotted;
break;
case(TYPE_DASHED):
- outl_func = (void *) o_box_print_dashed;
+ outl_func = o_box_print_dashed;
break;
case(TYPE_CENTER):
- outl_func = (void *) o_box_print_center;
+ outl_func = o_box_print_center;
break;
case(TYPE_PHANTOM):
- outl_func = (void *) o_box_print_phantom;
+ outl_func = o_box_print_phantom;
break;
case(TYPE_ERASE):
/* Unused for now, print it solid */
length = -1; space = -1;
- outl_func = (void *) o_box_print_solid;
+ outl_func = o_box_print_solid;
break;
}
if((length == 0) || (space == 0)) {
length = -1; space = -1;
- outl_func = (void *) o_box_print_solid;
+ outl_func = o_box_print_solid;
}
(*outl_func)(w_current, fp,
@@ -969,16 +967,16 @@
angle1 = -1; pitch1 = 1;
angle2 = -1; pitch2 = 1;
fill_width = -1;
- fill_func = (void *) o_box_print_filled;
+ fill_func = o_box_print_filled;
break;
case(FILLING_MESH):
- fill_func = (void *) o_box_print_mesh;
+ fill_func = o_box_print_mesh;
break;
case(FILLING_HATCH):
angle2 = -1; pitch2 = 1;
- fill_func = (void *) o_box_print_hatch;
+ fill_func = o_box_print_hatch;
break;
case(FILLING_VOID):
@@ -986,7 +984,7 @@
angle1 = -1; pitch1 = 1;
angle2 = -1; pitch2 = 1;
fill_width = -1;
- fill_func = (void *) o_box_print_filled;
+ fill_func = o_box_print_filled;
break;
case(FILLING_HOLLOW):
/* nop */
@@ -997,7 +995,7 @@
if((pitch1 <= 0) || (pitch2 <= 0)) {
angle1 = -1; pitch1 = 1;
angle2 = -1; pitch2 = 1;
- fill_func = (void *) o_box_print_filled;
+ fill_func = o_box_print_filled;
}
(*fill_func)(w_current, fp,
1.17 +2 -4 eda/geda/gaf/libgeda/src/o_bus_basic.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: o_bus_basic.c
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/libgeda/src/o_bus_basic.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -b -r1.16 -r1.17
--- o_bus_basic.c 3 Dec 2006 02:08:16 -0000 1.16
+++ o_bus_basic.c 7 Dec 2006 04:24:18 -0000 1.17
@@ -146,10 +146,8 @@
new_node->right = right;
new_node->bottom = bottom;
- /*! \todo questionable cast */
- new_node->draw_func = (void *) bus_draw_func;
- /*! \todo questionable cast */
- new_node->sel_func = (void *) select_func;
+ new_node->draw_func = bus_draw_func;
+ new_node->sel_func = select_func;
object_list = (OBJECT *) s_basic_link_object(new_node, object_list);
1.27 +14 -16 eda/geda/gaf/libgeda/src/o_circle_basic.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: o_circle_basic.c
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/libgeda/src/o_circle_basic.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -b -r1.26 -r1.27
--- o_circle_basic.c 3 Dec 2006 02:27:14 -0000 1.26
+++ o_circle_basic.c 7 Dec 2006 04:24:18 -0000 1.27
@@ -113,10 +113,8 @@
o_set_fill_options(w_current, new_node,
FILLING_HOLLOW, -1, -1, -1, -1, -1);
- /* \todo questionable cast */
- new_node->draw_func = (void *) circle_draw_func;
- /* \todo questionable cast */
- new_node->sel_func = (void *) select_func;
+ new_node->draw_func = circle_draw_func;
+ new_node->sel_func = select_func;
/* compute the bounding box and screen coords */
o_circle_recalc(w_current, new_node);
@@ -843,36 +841,36 @@
switch(o_current->line_type) {
case(TYPE_SOLID):
length = -1; space = -1;
- outl_func = (void *) o_circle_print_solid;
+ outl_func = o_circle_print_solid;
break;
case(TYPE_DOTTED):
length = -1;
- outl_func = (void *) o_circle_print_dotted;
+ outl_func = o_circle_print_dotted;
break;
case(TYPE_DASHED):
- outl_func = (void *) o_circle_print_dashed;
+ outl_func = o_circle_print_dashed;
break;
case(TYPE_CENTER):
- outl_func = (void *) o_circle_print_center;
+ outl_func = o_circle_print_center;
break;
case(TYPE_PHANTOM):
- outl_func = (void *) o_circle_print_phantom;
+ outl_func = o_circle_print_phantom;
break;
case(TYPE_ERASE):
/* Unused for now print it solid */
length = -1; space = -1;
- outl_func = (void *) o_circle_print_solid;
+ outl_func = o_circle_print_solid;
break;
}
if((length == 0) || (space == 0)) {
length = -1; space = -1;
- outl_func = (void *) o_circle_print_solid;
+ outl_func = o_circle_print_solid;
}
(*outl_func)(w_current, fp,
@@ -905,16 +903,16 @@
angle1 = -1; pitch1 = 1;
angle2 = -1; pitch2 = 1;
fill_width = -1;
- fill_func = (void *) o_circle_print_filled;
+ fill_func = o_circle_print_filled;
break;
case(FILLING_MESH):
- fill_func = (void *) o_circle_print_mesh;
+ fill_func = o_circle_print_mesh;
break;
case(FILLING_HATCH):
angle2 = -1; pitch2 = 1;
- fill_func = (void *) o_circle_print_hatch;
+ fill_func = o_circle_print_hatch;
break;
case(FILLING_VOID):
@@ -922,7 +920,7 @@
angle1 = -1; pitch1 = 1;
angle2 = -1; pitch2 = 1;
fill_width = -1;
- fill_func = (void *) o_circle_print_filled;
+ fill_func = o_circle_print_filled;
break;
case(FILLING_HOLLOW):
@@ -933,7 +931,7 @@
if((pitch1 <= 0) || (pitch2 <= 0)) {
angle1 = -1; pitch1 = 1;
angle2 = -1; pitch2 = 1;
- fill_func = (void *) o_circle_print_filled;
+ fill_func = o_circle_print_filled;
}
(*fill_func)(w_current, fp,
1.29 +4 -6 eda/geda/gaf/libgeda/src/o_complex_basic.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: o_complex_basic.c
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/libgeda/src/o_complex_basic.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -b -r1.28 -r1.29
--- o_complex_basic.c 5 Dec 2006 19:48:59 -0000 1.28
+++ o_complex_basic.c 7 Dec 2006 04:24:18 -0000 1.29
@@ -482,11 +482,10 @@
&new_node->complex->screen_x,
&new_node->complex->screen_y);
- /*! \todo questionable caste? */
- new_node->draw_func = (void *) complex_draw_func;
+ new_node->draw_func = complex_draw_func;
if (selectable) {
- new_node->sel_func = (void *) select_func;
+ new_node->sel_func = select_func;
} else {
new_node->sel_func = NULL;
}
@@ -716,12 +715,11 @@
new_node->color = color;
- /*! \todo questionable cast */
- new_node->draw_func = (void *) complex_draw_func;
+ new_node->draw_func = complex_draw_func;
/* (for a title block) an object that isn't selectable */
if (selectable) {
- new_node->sel_func = (void *) select_func;
+ new_node->sel_func = select_func;
} else {
new_node->sel_func = NULL;
}
1.26 +9 -11 eda/geda/gaf/libgeda/src/o_line_basic.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: o_line_basic.c
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/libgeda/src/o_line_basic.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -b -r1.25 -r1.26
--- o_line_basic.c 3 Dec 2006 02:27:14 -0000 1.25
+++ o_line_basic.c 7 Dec 2006 04:24:18 -0000 1.26
@@ -100,10 +100,8 @@
o_set_fill_options(w_current, new_node,
FILLING_HOLLOW, -1, -1, -1, -1, -1);
- /* \todo questionable cast */
- new_node->draw_func = (void *) line_draw_func;
- /* \todo questionable cast */
- new_node->sel_func = (void *) select_func;
+ new_node->draw_func = line_draw_func;
+ new_node->sel_func = select_func;
/* compute bounding box and screen coords */
o_line_recalc(w_current, new_node);
@@ -821,36 +819,36 @@
switch(o_current->line_type) {
case(TYPE_SOLID):
length = -1; space = -1;
- outl_func = (void *) o_line_print_solid;
+ outl_func = o_line_print_solid;
break;
case(TYPE_DOTTED):
length = -1;
- outl_func = (void *) o_line_print_dotted;
+ outl_func = o_line_print_dotted;
break;
case(TYPE_DASHED):
- outl_func = (void *) o_line_print_dashed;
+ outl_func = o_line_print_dashed;
break;
case(TYPE_CENTER):
- outl_func = (void *) o_line_print_center;
+ outl_func = o_line_print_center;
break;
case(TYPE_PHANTOM):
- outl_func = (void *) o_line_print_phantom;
+ outl_func = o_line_print_phantom;
break;
case(TYPE_ERASE):
/* Unused for now, print it solid */
length = -1; space = -1;
- outl_func = (void *) o_line_print_solid;
+ outl_func = o_line_print_solid;
break;
}
if((length == 0) || (space == 0)) {
length = -1; space = -1;
- outl_func = (void *) o_line_print_solid;
+ outl_func = o_line_print_solid;
}
(*outl_func)(w_current, fp,
1.32 +2 -4 eda/geda/gaf/libgeda/src/o_net_basic.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: o_net_basic.c
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/libgeda/src/o_net_basic.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -b -r1.31 -r1.32
--- o_net_basic.c 22 Sep 2006 18:48:07 -0000 1.31
+++ o_net_basic.c 7 Dec 2006 04:24:18 -0000 1.32
@@ -180,10 +180,8 @@
new_node->right = right;
new_node->bottom = bottom;
- /* \todo questionable cast */
- new_node->draw_func = (void *) net_draw_func;
- /* \todo questionable cast */
- new_node->sel_func = (void *) select_func;
+ new_node->draw_func = net_draw_func;
+ new_node->sel_func = select_func;
object_list = (OBJECT *) s_basic_link_object(new_node, object_list);
1.5 +2 -4 eda/geda/gaf/libgeda/src/o_picture.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: o_picture.c
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/libgeda/src/o_picture.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- o_picture.c 6 Aug 2006 16:45:31 -0000 1.4
+++ o_picture.c 7 Dec 2006 04:24:18 -0000 1.5
@@ -442,10 +442,8 @@
w_current->pixbuf_wh_ratio = 0;
*/
- /* \todo questionable cast */
- new_node->draw_func = (void *) picture_draw_func;
- /* \todo questionable cast */
- new_node->sel_func = (void *) select_func;
+ new_node->draw_func = picture_draw_func;
+ new_node->sel_func = select_func;
/* compute the bounding picture */
o_picture_recalc(w_current, new_node);
1.24 +2 -4 eda/geda/gaf/libgeda/src/o_pin_basic.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: o_pin_basic.c
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/libgeda/src/o_pin_basic.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -b -r1.23 -r1.24
--- o_pin_basic.c 22 Sep 2006 18:48:07 -0000 1.23
+++ o_pin_basic.c 7 Dec 2006 04:24:18 -0000 1.24
@@ -142,10 +142,8 @@
new_node->right = right;
new_node->bottom = bottom;
- /*! \todo questionable cast */
- new_node->draw_func = (void *) pin_draw_func;
- /*! \todo questionable cast */
- new_node->sel_func = (void *) select_func;
+ new_node->draw_func = pin_draw_func;
+ new_node->sel_func = select_func;
new_node->pin_type = pin_type;
new_node->whichend = whichend;
1.24 +2 -4 eda/geda/gaf/libgeda/src/o_text_basic.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: o_text_basic.c
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/libgeda/src/o_text_basic.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -b -r1.23 -r1.24
--- o_text_basic.c 17 Oct 2006 10:02:27 -0000 1.23
+++ o_text_basic.c 7 Dec 2006 04:24:18 -0000 1.24
@@ -912,10 +912,8 @@
new_node->text = text;
- /* \todo questionable cast */
- new_node->draw_func = (void *) text_draw_func;
- /* \todo questionable cast */
- new_node->sel_func = (void *) select_func;
+ new_node->draw_func = text_draw_func;
+ new_node->sel_func = select_func;
new_node->color = color;
new_node->visibility = visibility;
1.12 +0 -2 eda/geda/gaf/libgeda/src/s_attrib.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: s_attrib.c
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/libgeda/src/s_attrib.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -b -r1.11 -r1.12
--- s_attrib.c 15 Jul 2006 17:00:51 -0000 1.11
+++ s_attrib.c 7 Dec 2006 04:24:18 -0000 1.12
@@ -151,8 +151,6 @@
{
if (counter < attrib_index) {
return(attrib[counter].attrib_name);
- } else {
- return(NULL);
}
return(NULL);
1.12 +0 -2 eda/geda/gaf/libgeda/src/s_papersizes.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: s_papersizes.c
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/libgeda/src/s_papersizes.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -b -r1.11 -r1.12
--- s_papersizes.c 15 Jul 2006 17:00:51 -0000 1.11
+++ s_papersizes.c 7 Dec 2006 04:24:18 -0000 1.12
@@ -156,8 +156,6 @@
{
if (counter < papersizes_index) {
return(papersizes[counter].papersize_name);
- } else {
- return(NULL);
}
return(NULL);
_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs