(/home/sate/Testcases/c/cve/wireshark-1.2.0/gtk/main.c) |
| |
| 372 | | | selected_ptree_info_cb(GtkWidget *widget _U_, gpointer data _U_) |
| 373 | | | { |
| 374 | | | int field_id; |
| 375 | | | const gchar *proto_abbrev; |
| 376 | | | gpointer dialog; |
| 377 | | | |
| 378 | | | |
| 379 | | | if (cfile.finfo_selected) { |
| 380 | | | |
| 381 | | | |
| 382 | | | field_id = cfile.finfo_selected->hfinfo->id; |
| 383 | | | |
| 384 | | | if(!proto_registrar_is_protocol(field_id)) { |
| 385 | | | field_id = proto_registrar_get_parent(cfile.finfo_selected->hfinfo->id); |
| 386 | | | } |
| 387 | | | |
| 388 | | | proto_abbrev = proto_registrar_get_abbrev(field_id); |
| 389 | | | |
| 390 | | | if (!proto_is_private(field_id)) { |
| 391 | | | |
| 392 | | | dialog = simple_dialog(ESD_TYPE_CONFIRMATION, ESD_BTNS_OK_CANCEL, |
| 393 | | | "%sOpen Wireshark Wiki page of protocol \"%s\"?%s\n" |
| 394 | | | "\n" |
| 395 | | | "This will open the \"%s\" related Wireshark Wiki page in your Web browser.\n" |
| 396 | | | "\n" |
| 397 | | | "The Wireshark Wiki is a collaborative approach to provide information " |
| 398 | | | "about Wireshark in several ways (not limited to protocol specifics).\n" |
| 399 | | | "\n" |
| 400 | | | "This Wiki is new, so the page of the selected protocol " |
| 401 | | | "may not exist and/or may not contain valuable information.\n" |
| 402 | | | "\n" |
| 403 | | | "As everyone can edit the Wiki and add new content (or extend existing), " |
| 404 | | | "you are encouraged to add information if you can.\n" |
| 405 | | | "\n" |
| 406 | | | "Hint 1: If you are new to wiki editing, try out editing the Sandbox first!\n" |
| 407 | | | "\n" |
| 408 | | | "Hint 2: If you want to add a new protocol page, you should use the ProtocolTemplate, " |
| 409 | | | "which will save you a lot of editing and will give a consistent look over the pages.", |
| 410 | | | simple_dialog_primary_start(), proto_abbrev, simple_dialog_primary_end(), proto_abbrev); |
| 411 | | | simple_dialog_set_cb(dialog, selected_ptree_info_answered_cb, (gpointer)proto_abbrev); |
| 412 | | | } else { |
| 413 | | | |
| 414 | | | dialog = simple_dialog(ESD_TYPE_WARN, ESD_BTN_OK, |
Unused Value
The value assigned to dialog is never subsequently used on any execution path. |
|
| 415 | | | "%sCan't open Wireshark Wiki page of protocol \"%s\"%s\n" |
| 416 | | | "\n" |
| 417 | | | "This would open the \"%s\" related Wireshark Wiki page in your Web browser.\n" |
| 418 | | | "\n" |
| 419 | | | "Since this is a private protocol, such information is not available in " |
| 420 | | | "a public wiki. Therefore this wiki entry is blocked.\n" |
| 421 | | | "\n" |
| 422 | | | "Sorry for the inconvenience.\n", |
| 423 | | | simple_dialog_primary_start(), proto_abbrev, simple_dialog_primary_end(), proto_abbrev); |
| 424 | | | } |
| 425 | | | } |
| 426 | | | } |
| |