[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
gEDA-cvs: CVS update: Makefile.am
User: danmc
Date: 05/02/21 00:29:36
Modified: . Makefile.am gattrib.c listsort.c s_sheet_data.c
s_table.c s_toplevel.c x_dialog.c x_fileselect.c
x_gtksheet.c
Log:
Fix many instances of non-void functions not having return values.
Most of these were simply changed to void functions since nothing
seemed to be expecting a return value. While here, garbage collect
several unused variables to make the compiler warnings easier to
dig through. Also if we're using gcc, then turn on -Wall.
Revision Changes Path
1.4 +3 -1 eda/geda/devel/gattrib/src/Makefile.am
(In the diff below, changes in quantity of whitespace are not shown.)
Index: Makefile.am
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/devel/gattrib/src/Makefile.am,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- Makefile.am 22 Jan 2005 16:30:26 -0000 1.3
+++ Makefile.am 21 Feb 2005 05:29:33 -0000 1.4
@@ -1,7 +1,9 @@
## Process this file with automake to produce Makefile.in
## This Makefile.am created for gattrib by SDB 12.13.2003
-AM_CFLAGS = -g -O2
+if CCISGCC
+AM_CFLAGS = -Wall
+endif
bin_PROGRAMS = gattrib
1.13 +0 -3 eda/geda/devel/gattrib/src/gattrib.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: gattrib.c
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/devel/gattrib/src/gattrib.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -b -r1.12 -r1.13
--- gattrib.c 20 Feb 2005 17:09:18 -0000 1.12
+++ gattrib.c 21 Feb 2005 05:29:33 -0000 1.13
@@ -62,7 +62,6 @@
#include "../include/struct.h" /* typdef and struct declarations */
#include "../include/prototype.h" /* function prototypes */
#include "../include/globals.h"
-/* #include "../include/x_menu.h" */
#ifdef HAVE_LIBDMALLOC
#include <dmalloc.h>
@@ -115,7 +114,6 @@
int return_code; /* used when invoking s_toplevel_read_page */
int argv_index;
char *cwd;
- char *input_str;
PAGE *p_local;
char *logfile;
@@ -206,7 +204,6 @@
* position of the first filename */
i = argv_index;
while(argv[i] != NULL) {
- PAGE *page;
gchar *temp_filename = g_build_path (G_DIR_SEPARATOR_S,
cwd,
argv[i],
1.4 +5 -1 eda/geda/devel/gattrib/src/listsort.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: listsort.c
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/devel/gattrib/src/listsort.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- listsort.c 14 Feb 2005 22:31:35 -0000 1.3
+++ listsort.c 21 Feb 2005 05:29:33 -0000 1.4
@@ -1,4 +1,4 @@
-/* $Id: listsort.c,v 1.3 2005/02/14 22:31:35 danmc Exp $ */
+/* $Id: listsort.c,v 1.4 2005/02/21 05:29:33 danmc Exp $ */
/*----------------------------------------------------------------*
@@ -57,6 +57,10 @@
#include <stdio.h>
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
+
/*------------------------------------------------------------------
* Gattrib specific includes
*------------------------------------------------------------------*/
1.8 +0 -9 eda/geda/devel/gattrib/src/s_sheet_data.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: s_sheet_data.c
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/devel/gattrib/src/s_sheet_data.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- s_sheet_data.c 5 Feb 2005 16:03:53 -0000 1.7
+++ s_sheet_data.c 21 Feb 2005 05:29:33 -0000 1.8
@@ -98,12 +98,6 @@
void s_sheet_data_add_master_comp_list_items(OBJECT *start_obj) {
char *temp_uref;
OBJECT *o_current;
- OBJECT *temp_object;
-
- char *numslots_value;
- int numslots;
- char *slot_value;
- OBJECT *slot_text_object;
#ifdef DEBUG
printf("=========== Just entered s_sheet_data_add_master_comp_list_items! ==============\n");
@@ -162,10 +156,7 @@
void s_sheet_data_add_master_comp_attrib_list_items(OBJECT *start_obj) {
char *attrib_text;
char *attrib_name;
- char *attrib_value;
- char *temp_uref;
OBJECT *o_current;
- OBJECT *temp_object;
ATTRIB *a_current;
#ifdef DEBUG
1.8 +2 -4 eda/geda/devel/gattrib/src/s_table.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: s_table.c
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/devel/gattrib/src/s_table.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- s_table.c 13 Feb 2005 16:30:28 -0000 1.7
+++ s_table.c 21 Feb 2005 05:29:33 -0000 1.8
@@ -225,7 +225,6 @@
*------------------------------------------------------------------*/
void s_table_add_toplevel_comp_items_to_comp_table(OBJECT *start_obj) {
OBJECT *o_current;
- gchar *temp;
gchar *temp_uref;
int row, col;
gchar *attrib_text;
@@ -407,7 +406,6 @@
void s_table_add_toplevel_pin_items_to_pin_table(OBJECT *start_obj) {
OBJECT *o_current;
OBJECT *o_lower_current;
- gchar *temp;
gchar *temp_uref;
gchar *pinnumber;
gchar *row_label;
@@ -515,7 +513,7 @@
* the cells, and places them back into TABLE. This is the
* first step in saving out a project.
*------------------------------------------------------------------*/
-int s_table_gtksheet_to_all_tables() {
+void s_table_gtksheet_to_all_tables() {
int num_rows;
int num_cols;
@@ -578,7 +576,7 @@
* the cells, and placing them back into TABLE. This is the
* first step in saving out a project.
*------------------------------------------------------------------*/
-int s_table_gtksheet_to_table(GtkSheet *local_gtk_sheet, STRING_LIST *master_row_list,
+void s_table_gtksheet_to_table(GtkSheet *local_gtk_sheet, STRING_LIST *master_row_list,
STRING_LIST *master_col_list, TABLE **local_table,
int num_rows, int num_cols)
{
1.12 +3 -16 eda/geda/devel/gattrib/src/s_toplevel.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: s_toplevel.c
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/devel/gattrib/src/s_toplevel.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -b -r1.11 -r1.12
--- s_toplevel.c 12 Feb 2005 16:43:41 -0000 1.11
+++ s_toplevel.c 21 Feb 2005 05:29:33 -0000 1.12
@@ -54,7 +54,6 @@
*------------------------------------------------------------------*/
int s_toplevel_read_page(char *filename)
{
- PAGE local_page;
int file_return_code;
/* Set the new filename */
@@ -76,7 +75,7 @@
* the object list when no symbol file is found. If this fcn finds
* a placeholder, it warns the user.
*------------------------------------------------------------------*/
-int s_toplevel_verify_design(TOPLEVEL *pr_current)
+void s_toplevel_verify_design(TOPLEVEL *pr_current)
{
OBJECT *o_current;
PAGE *p_current;
@@ -115,7 +114,7 @@
* not filled out yet), and 0 if the project is non-empty (i.e. there
* is some data in pr_current).
*------------------------------------------------------------------*/
-int s_toplevel_empty_project()
+void s_toplevel_empty_project()
{
/* Nothing here yet. Is this necessary in current program
* architecture? */
@@ -482,12 +481,7 @@
OBJECT *o_current;
OBJECT *comp_prim_obj;
char *temp_uref;
- char *temp_netname;
- char *temp_pin;
- STRING_LIST *new_comp_attrib_list;
STRING_LIST *new_comp_attrib_pair_list;
- STRING_LIST *old_comp_attrib_pair_list;
- STRING_LIST *new_net_attrib_list;
STRING_LIST *new_pin_attrib_list;
/* ----- First deal with all components on the page. ----- */
@@ -594,15 +588,12 @@
{
STRING_LIST *new_attrib_list;
STRING_LIST *local_attrib_list;
- STRING_LIST *row_list;
int i;
int row = -1;
int count = 0;
- char *row_item;
char *name_value_pair;
char *new_attrib_value;
char *new_attrib_name;
- char *temp;
#if DEBUG
printf("----- Entering s_toplevel_get_component_attribs_in_sheet.\n");
@@ -841,7 +832,7 @@
STRING_LIST *s_toplevel_get_net_attribs_in_sheet(char *netname)
{
/* must be filled in */
- return;
+ return NULL;
}
@@ -871,7 +862,6 @@
{
STRING_LIST *new_attrib_list;
STRING_LIST *local_attrib_list;
- STRING_LIST *row_list;
int i;
int row = -1;
int count = 0;
@@ -880,7 +870,6 @@
char *name_value_pair;
char *new_attrib_value;
char *new_attrib_name;
- char *temp;
#if DEBUG
printf("----- Entering s_toplevel_get_pin_attribs_in_sheet.\n");
@@ -967,9 +956,7 @@
char *new_name_value_pair;
char *new_attrib_name;
char *new_attrib_value;
- char *old_attrib_name;
char *old_attrib_value;
- ATTRIB *a_current;
#if DEBUG
printf("----- Entering s_toplevel_update_pin_attribs_in_toplevel.\n");
1.16 +14 -15 eda/geda/devel/gattrib/src/x_dialog.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: x_dialog.c
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/devel/gattrib/src/x_dialog.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -b -r1.15 -r1.16
--- x_dialog.c 15 Feb 2005 23:34:43 -0000 1.15
+++ x_dialog.c 21 Feb 2005 05:29:33 -0000 1.16
@@ -61,7 +61,6 @@
#include "../include/struct.h" /* typdef and struct declarations */
#include "../include/prototype.h" /* function prototypes */
#include "../include/globals.h"
-#include "../include/x_menu.h"
#ifdef HAVE_LIBDMALLOC
#include <dmalloc.h>
@@ -74,7 +73,7 @@
/* --------------------------------------------------------- *
* This asks for the name of the attrib column to insert
* --------------------------------------------------------- */
-char *x_dialog_newattrib_get_name()
+void x_dialog_newattrib_get_name()
{
GtkWidget *newattrib_window;
GtkWidget *label;
@@ -197,7 +196,7 @@
* OK button pressed -- First get text in entry box. Then
* return it.
* --------------------------------------------------------- */
-int x_dialog_newattrib_ok_callback(GtkWidget *buttonok,
+void x_dialog_newattrib_ok_callback(GtkWidget *buttonok,
GtkWidget *window)
{
GtkEntry *entry;
@@ -224,7 +223,7 @@
/* --------------------------------------------------------- *
* close window
* --------------------------------------------------------- */
-int x_dialog_newattrib_close_callback(GtkWidget *buttonclose, GtkWidget *window)
+void x_dialog_newattrib_close_callback(GtkWidget *buttonclose, GtkWidget *window)
{
x_dialog_close_window(window);
}
@@ -239,7 +238,7 @@
* This fcn throws up the "detele foo, are you sure" dialog
* box. It offers two buttons: "yes" and "cancel"
* --------------------------------------------------------- */
-int x_dialog_delattrib_confirm()
+void x_dialog_delattrib_confirm()
{
GtkWidget *delattrib_window;
GtkWidget *label;
@@ -367,7 +366,7 @@
/* --------------------------------------------------------- *
* close window
* --------------------------------------------------------- */
-int x_dialog_delattrib_close_callback(GtkWidget *buttonclose,
+void x_dialog_delattrib_close_callback(GtkWidget *buttonclose,
GtkWidget *window)
{
x_dialog_close_window(window);
@@ -378,7 +377,7 @@
* Yes button pressed -- Go ahead & delete attrib column, the
* close window and return.
* --------------------------------------------------------- */
-int x_dialog_delattrib_yes_callback(GtkWidget *buttonyes,
+void x_dialog_delattrib_yes_callback(GtkWidget *buttonyes,
GtkWidget *window)
{
/* call the fcn to actually delete the attrib column. */
@@ -406,7 +405,7 @@
* It offers the user the chance to close the project without
* saving because he read a schematic with a missing symbol file.
* --------------------------------------------------------- */
-int x_dialog_missing_sym()
+void x_dialog_missing_sym()
{
GtkWidget *missing_sym_window;
GtkWidget *label;
@@ -521,7 +520,7 @@
/* --------------------------------------------------------- *
* continue window
* --------------------------------------------------------- */
-int x_dialog_missing_sym_continue_callback(GtkWidget *buttonclose,
+void x_dialog_missing_sym_continue_callback(GtkWidget *buttonclose,
GtkWidget *window)
{
#ifdef DEBUG
@@ -535,7 +534,7 @@
/* --------------------------------------------------------- *
* Abort button pressed -- close the program now.
* --------------------------------------------------------- */
-int x_dialog_missing_sym_abort_callback(GtkWidget *buttonyes,
+void x_dialog_missing_sym_abort_callback(GtkWidget *buttonyes,
GtkWidget *window)
{
#ifdef DEBUG
@@ -553,7 +552,7 @@
* This is the "Unsaved data -- are you sure you want to quit?"
* dialog box which is thrown up before the user quits.
* --------------------------------------------------------- */
-int x_dialog_unsaved_data()
+void x_dialog_unsaved_data()
{
GtkWidget *unsaved_data_window;
GtkWidget *label;
@@ -663,7 +662,7 @@
/* --------------------------------------------------------- *
* continue window
* --------------------------------------------------------- */
-int x_dialog_unsaved_data_continue_callback(GtkWidget *buttonclose,
+void x_dialog_unsaved_data_continue_callback(GtkWidget *buttonclose,
GtkWidget *window)
{
#ifdef DEBUG
@@ -678,7 +677,7 @@
/* --------------------------------------------------------- *
* Abort button pressed -- go back to save.
* --------------------------------------------------------- */
-int x_dialog_unsaved_data_abort_callback(GtkWidget *buttonyes,
+void x_dialog_unsaved_data_abort_callback(GtkWidget *buttonyes,
GtkWidget *window)
{
#ifdef DEBUG
@@ -699,7 +698,7 @@
* This fcn informs the user that he has chosen an
* unimplemented feature.
* --------------------------------------------------------- */
-int x_dialog_unimplemented_feature()
+void x_dialog_unimplemented_feature()
{
GtkWidget *unimplemented_feature_window;
GtkWidget *label = NULL;
@@ -809,7 +808,7 @@
}
/* --------------------------------------------------------- */
-int x_dialog_about_close_callback(GtkWidget * widget, GtkWidget *window)
+void x_dialog_about_close_callback(GtkWidget * widget, GtkWidget *window)
{
x_dialog_close_window(window);
}
1.9 +3 -6 eda/geda/devel/gattrib/src/x_fileselect.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: x_fileselect.c
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/devel/gattrib/src/x_fileselect.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- x_fileselect.c 12 Feb 2005 16:43:41 -0000 1.8
+++ x_fileselect.c 21 Feb 2005 05:29:33 -0000 1.9
@@ -78,7 +78,6 @@
#include "../include/struct.h" /* typdef and struct declarations */
#include "../include/prototype.h" /* function prototypes */
#include "../include/globals.h"
-#include "../include/x_menu.h"
#ifdef HAVE_LIBDMALLOC
#include <dmalloc.h>
@@ -778,7 +777,6 @@
{
PAGE *p_local;
char *string;
- int len;
int return_code = 0;
int old_num_rows, old_num_cols; /* There is a better way . . . */
@@ -1019,10 +1017,12 @@
char *new_filename)
{
char *temp = NULL;
+#if 0
char *ptr = NULL;
+ int i;
+#endif
char *filename = NULL;
char *directory = NULL;
- int i;
#ifdef DEBUG
printf("In x_fileselect_update_dirfile_saveas, new_filename = [%s]\n", new_filename);
@@ -1166,13 +1166,10 @@
GtkWidget *scrolled_win;
GtkWidget *action_area;
GtkWidget *separator;
- GtkWidget *optionmenu;
GtkWidget *drawbox;
GtkWidget *label;
GtkWidget *searchbox;
- int type = FILESELECT; /* This was a calling arg in gschem */
- /* here, I have just made it fixed. */
FILEDIALOG *f_current;
1.7 +1 -9 eda/geda/devel/gattrib/src/x_gtksheet.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: x_gtksheet.c
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/devel/gattrib/src/x_gtksheet.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- x_gtksheet.c 5 Feb 2005 16:03:53 -0000 1.6
+++ x_gtksheet.c 21 Feb 2005 05:29:33 -0000 1.7
@@ -62,7 +62,6 @@
#include "../include/struct.h" /* typdef and struct declarations */
#include "../include/prototype.h" /* function prototypes */
#include "../include/globals.h"
-#include "../include/x_menu.h"
#ifdef HAVE_LIBDMALLOC
#include <dmalloc.h>
@@ -78,16 +77,10 @@
void
x_gtksheet_init()
{
- gint i, j;
- int num_rows, num_cols;
+ gint i;
gchar *folder[]= {"Components",
"Nets",
"Pins"};
- gchar *title[]= {"Components",
- "Nets",
- "Pins"};
- STRING_LIST *string_list_item;
- gchar *text;
#ifndef HAS_GTK22
GtkSheetRange *Range;
@@ -308,7 +301,6 @@
{
STRING_LIST *string_list_item;
gchar *text;
- guint widest;
int j;
string_list_item = list_head;