From: arif Date: Tue, 10 Nov 2009 17:33:50 +0000 (+0000) Subject: smyrna warnings clean up X-Git-Tag: LAST_LIBGRAPH~32^2~1573 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=668c0f2350c03f913038999ab18c92b8914c77b0;p=graphviz smyrna warnings clean up --- diff --git a/cmd/smyrna/gltemplate.c b/cmd/smyrna/gltemplate.c index fb4d21ea5..8757fd71d 100755 --- a/cmd/smyrna/gltemplate.c +++ b/cmd/smyrna/gltemplate.c @@ -321,6 +321,8 @@ static gboolean key_press_event(GtkWidget * widget, GdkEventKey * event, gpointe { view->keymap.down=1; view->keymap.keyVal=event->keyval; + return FALSE; + } @@ -330,6 +332,8 @@ static gboolean key_release_event(GtkWidget * widget, GdkEventKey * event, gpoin view->keymap.down=0; view->keymap.keyVal=0; originate_distorded_coordinates(view->Topview); + return FALSE; + } diff --git a/cmd/smyrna/gui/appmouse.c b/cmd/smyrna/gui/appmouse.c index 1d7146735..bcd96d84f 100644 --- a/cmd/smyrna/gui/appmouse.c +++ b/cmd/smyrna/gui/appmouse.c @@ -26,7 +26,7 @@ static float prevX=0; static float prevY=0; -static int apply_actions(ViewInfo* v,int x,int y) +static void apply_actions(ViewInfo* v,int x,int y) { int a; a=get_mode(v); diff --git a/cmd/smyrna/gui/glcompui.c b/cmd/smyrna/gui/glcompui.c index 6c6f823e8..2cdeabcdb 100644 --- a/cmd/smyrna/gui/glcompui.c +++ b/cmd/smyrna/gui/glcompui.c @@ -39,7 +39,7 @@ static glCompButton *rotateBtn; static glCompButton *toFisheye; static glCompButton *toNormal; static glCompImage *imgFisheye; -static glCompButton *img3D; +static glCompImage *img3D; static glCompButton *panBtn; @@ -130,7 +130,7 @@ static void switch2D3D(void *obj, GLfloat x, GLfloat y, view->active_camera = -1; /*set to camera */ glCompButtonShow(to3DBtn); glCompButtonHide(to2DBtn); - panBtn->common.callbacks.click(panBtn, (GLfloat) 0, + panBtn->common.callbacks.click((glCompObj*)panBtn, (GLfloat) 0, (GLfloat) 0, (glMouseButtonType) 0); img3D->common.visible = 0; diff --git a/cmd/smyrna/gui/gui.c b/cmd/smyrna/gui/gui.c index 71cc05b0c..e31c31cf2 100755 --- a/cmd/smyrna/gui/gui.c +++ b/cmd/smyrna/gui/gui.c @@ -515,6 +515,6 @@ void append_textview(GtkTextView * textv, const char *s, size_t bytes) /*set iterator to the end of the buffer */ gtk_text_buffer_get_end_iter(gtkbuf, &endit); /* insert buf to the end */ - gtk_text_buffer_insert(gtkbuf, &endit, s, bytes); + gtk_text_buffer_insert(gtkbuf, &endit, s, (gint)bytes); } diff --git a/cmd/smyrna/gui/topviewsettings.c b/cmd/smyrna/gui/topviewsettings.c index 1eb98d2d6..60390bef7 100644 --- a/cmd/smyrna/gui/topviewsettings.c +++ b/cmd/smyrna/gui/topviewsettings.c @@ -89,7 +89,7 @@ static int get_text_widget_to_attribute(char *attribute, char *widget_name, if (strlen(attribute) > 512) return 0; agattr(g, AGRAPH, attribute, - gtk_entry_get_text((GtkEntry *) + (char*)gtk_entry_get_text((GtkEntry *) glade_xml_get_widget(xml, widget_name))); return 1; } diff --git a/cmd/smyrna/gvprpipe.c b/cmd/smyrna/gvprpipe.c index 18dcb2d92..d27497915 100644 --- a/cmd/smyrna/gvprpipe.c +++ b/cmd/smyrna/gvprpipe.c @@ -37,7 +37,7 @@ static ssize_t outfn(void *sp, const char *buf, size_t nbyte, void *dp) nbyte); append_textview((GtkTextView *) glade_xml_get_widget(xml, "mainconsole"), buf, nbyte); - return nbyte; + return (ssize_t)nbyte; } #ifdef UNUSED diff --git a/cmd/smyrna/hotkeymap.c b/cmd/smyrna/hotkeymap.c index f6e22375c..891b2e30f 100644 --- a/cmd/smyrna/hotkeymap.c +++ b/cmd/smyrna/hotkeymap.c @@ -45,6 +45,7 @@ int static get_button(const char* s) return B_RCTRL; if (strcmp(s,"0")==0) return 0; + return 0; } int static get_view_mode(const char* s) diff --git a/cmd/smyrna/main.c b/cmd/smyrna/main.c index e0c58bea5..77dd7cf77 100755 --- a/cmd/smyrna/main.c +++ b/cmd/smyrna/main.c @@ -79,11 +79,11 @@ char *smyrnaPath(char *suffix) assert(smyrnaDir); if (!buf) { - baselen = strlen(smyrnaDir) + 2; + baselen = (int)strlen(smyrnaDir) + 2; buflen = baselen + 100; buf = N_NEW(buflen, char); } - slen = strlen(suffix); + slen = (int)strlen(suffix); if (baselen + slen > buflen) { buflen = baselen + slen; buf = realloc(buf, buflen); @@ -232,8 +232,8 @@ int main(int argc, char *argv[]) gladewidget = glade_xml_get_widget(xml, "hbox10"); graphComboBox = (GtkComboBox *) gtk_combo_box_new_text(); - gtk_box_pack_end(gladewidget, graphComboBox, 1, 1, 10); - gtk_widget_show(graphComboBox); + gtk_box_pack_end((GtkBox*)gladewidget, (GtkWidget*)graphComboBox, 1, 1, 10); + gtk_widget_show((GtkWidget*)graphComboBox); view->graphComboBox = graphComboBox; gtk_main(); diff --git a/cmd/smyrna/selection.c b/cmd/smyrna/selection.c index 288acab10..667ec4600 100755 --- a/cmd/smyrna/selection.c +++ b/cmd/smyrna/selection.c @@ -525,6 +525,8 @@ int lineintersects(float X1, float X2, float Y1, float Y2) int intersects, in; RX = view->Selection.X; RY = view->Selection.Y; + RH=view->Selection.H; + RW=view->Selection.W; if ((is_point_in_rectangle(X1, Y1, RX, RY, RW, RH)) && (is_point_in_rectangle(X2, Y2, RX, RY, RW, RH))) return 1; @@ -575,7 +577,7 @@ int is_point_in_rectangle(float X, float Y, float RX, float RY, float RW, -static int select_topview_node(topview_node * n) +static void select_topview_node(topview_node * n) { static float x1,y1,x2,y2,x,y; static int sel_type=0; /*0:select all , 1:only nodes 2:only edges*/ @@ -609,7 +611,7 @@ static int select_topview_node(topview_node * n) } } -static int select_topview_edge(topview_edge* e) +static void select_topview_edge(topview_edge* e) { static float x1,y1,x2,y2,n1x,n1y,n2x,n2y; static int sel_type=0; /*0:select all , 1:only nodes 2:only edges*/