[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gEDA-dev: pcb CVS
Dan -
On Tue, Jan 22, 2008 at 10:32:05AM -0800, Larry Doolittle wrote:
> [chop] the only warnings left in the final build are
>
> ../../pcb-1.99w/src/hid/gtk/gui-misc.c:459: warning: passing argument 1 of 'run_get_location_loop' discards qualifiers from pointer target type
> ../../pcb-1.99w/src/autoroute.c:3021: warning: 'result.route_had_conflicts' may be used uninitialized in this function
Patch to "fix" the first of those warnings. IWFM [TM].
Debian sid amd64, gcc-4.3.
- Larry
diff -ur pcb/src/hid/gtk/gui.h pcb-1.99w/src/hid/gtk/gui.h
--- pcb/src/hid/gtk/gui.h 2008-01-10 15:17:08.000000000 -0800
+++ pcb-1.99w/src/hid/gtk/gui.h 2008-01-22 10:39:11.000000000 -0800
@@ -294,7 +294,7 @@
/* gui-misc.c function prototypes
*/
-void ghid_status_line_set_text (gchar * text);
+void ghid_status_line_set_text (const gchar * text);
void ghid_cursor_position_label_set_text (gchar * text);
void ghid_cursor_position_relative_label_set_text (gchar * text);
@@ -469,7 +469,7 @@
void (*func_cb) (), gpointer data);
void ghid_dialog_report (gchar * title, gchar * message);
-void ghid_label_set_markup (GtkWidget * label, gchar * text);
+void ghid_label_set_markup (GtkWidget * label, const gchar * text);
void ghid_set_cursor_position_labels (void);
void ghid_set_status_line_label (void);
diff -ur pcb/src/hid/gtk/gui-misc.c pcb-1.99w/src/hid/gtk/gui-misc.c
--- pcb/src/hid/gtk/gui-misc.c 2008-01-06 20:13:37.000000000 -0800
+++ pcb-1.99w/src/hid/gtk/gui-misc.c 2008-01-22 10:43:37.000000000 -0800
@@ -61,7 +61,7 @@
static GdkCursorType oldCursor;
void
-ghid_status_line_set_text (gchar * text)
+ghid_status_line_set_text (const gchar * text)
{
if (ghidgui->command_entry_status_line_active)
return;
@@ -391,7 +391,7 @@
| the mouse pointer coordinates at the time of the mouse button event.
*/
static gboolean
-run_get_location_loop (gchar * message)
+run_get_location_loop (const gchar * message)
{
GMainLoop *loop;
gulong button_handler, key_handler;
@@ -456,7 +456,7 @@
void
ghid_get_user_xy (const char *msg)
{
- run_get_location_loop ((gchar *) msg);
+ run_get_location_loop (msg);
}
/* XXX The abort dialog isn't implemented yet in the Gtk port
diff -ur pcb/src/hid/gtk/gui-utils.c pcb-1.99w/src/hid/gtk/gui-utils.c
--- pcb/src/hid/gtk/gui-utils.c 2007-12-10 17:40:43.000000000 -0800
+++ pcb-1.99w/src/hid/gtk/gui-utils.c 2008-01-22 10:40:24.000000000 -0800
@@ -676,12 +676,10 @@
void
-ghid_label_set_markup (GtkWidget * label, gchar * text)
+ghid_label_set_markup (GtkWidget * label, const gchar * text)
{
- if (label && text)
- gtk_label_set_markup (GTK_LABEL (label), text);
- else if (label)
- gtk_label_set_text (GTK_LABEL (label), "");
+ if (label)
+ gtk_label_set_text (GTK_LABEL (label), text ? text : "");
}
_______________________________________________
geda-dev mailing list
geda-dev@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-dev