Fix warnings on FreeBSD

This commit is contained in:
Ulrich Wilkens
2018-06-01 03:55:10 +02:00
committed by Jon Trulson
parent 885b65a09a
commit 297b6bd845
65 changed files with 342 additions and 269 deletions

View File

@@ -57,9 +57,9 @@ public:
BookmarkEdit (UAS_Pointer<Mark> &mark)
: f_mark_ptr (mark),
f_shell (NULL),
f_modified (FALSE),
f_name_text(NULL),
f_notes_text(NULL),
f_modified (FALSE),
f_wm_delete_callback(NULL)
{
MarkMgr::request ((UAS_Receiver<MarkMoved> *) this);

View File

@@ -118,15 +118,15 @@ GraphicAgent::GraphicAgent (UAS_Pointer<UAS_Common> &node_ptr,
: f_shell (NULL),
f_node_ptr(node_ptr),
f_graphic (gr),
f_panner_state (PANNER_NONE),
f_current_scale (100),
f_scale_button(NULL),
f_setcustom(0),
f_panner(NULL),
f_pixmap_widget(NULL),
f_panner_state (PANNER_NONE),
f_current_scale (100),
f_view_menu(NULL),
f_message_area(NULL),
f_custom_scale(NULL)
f_scale_button(NULL),
f_custom_scale(NULL),
f_setcustom(0)
{
f_graphic->pixmap_graphic()->agent(this);

View File

@@ -152,14 +152,13 @@ private: // variables
inline
LibraryAgent::LibraryAgent()
: f_shell (NULL),
f_doc_tree_view(),
f_oe (NULL),
f_keep_forever (FALSE),
f_wm_delete_callback (NULL),
f_tracking_hierarchy (NULL),
f_popped_down (TRUE),
f_close (NULL),
f_close_sensitive (FALSE),
f_doc_tree_view(),
f_copy(NULL),
f_detach(NULL),
f_detach2(NULL),
@@ -171,6 +170,7 @@ LibraryAgent::LibraryAgent()
f_remove(NULL),
f_remove2(NULL),
f_auto_track(NULL),
f_close_sensitive (FALSE),
f_status_text(NULL),
f_scope_menu(NULL)

View File

@@ -219,15 +219,15 @@ MapButton::destroy()
// /////////////////////////////////////////////////////////////////
MapAgent::MapAgent()
: f_shell (NULL),
f_onscreen (FALSE),
f_locked(FALSE),
: f_locked(FALSE),
f_map_mode(LOCAL_MODE),
f_shell (NULL),
f_porthole(NULL),
f_panner(NULL),
f_tree(NULL),
f_wm_delete_callback(NULL),
f_lock(NULL),
f_onscreen (FALSE),
f_min_tree_width(0),
f_min_tree_height(0)
{

View File

@@ -84,8 +84,8 @@
MarkChooser::MarkChooser (Widget parent, xList<MarkCanvas *> &marks,
const char *title_key, const char *ok_key)
: f_selected_item (-1),
f_mark_list (&marks),
f_done(FALSE)
f_done(FALSE),
f_mark_list (&marks)
{
create_ui (parent, title_key, ok_key);
update_list();

View File

@@ -81,9 +81,9 @@
// /////////////////////////////////////////////////////////////////
MarkListView::MarkListView()
: f_shell (NULL),
f_popped_up (FALSE),
f_selected_item(0)
: f_selected_item(0),
f_shell (NULL),
f_popped_up (FALSE)
{
}

View File

@@ -94,8 +94,8 @@ private: // variables
inline
MessageAgent::MessageAgent()
: f_dialog (NULL),
f_exit_flag (False),
f_text(NULL),
f_exit_flag (False),
f_real_parent(NULL),
f_popped_up(FALSE),
f_pressed_ok(FALSE)

View File

@@ -778,16 +778,6 @@ NodeWindowAgent::NodeWindowAgent (u_int serial_no)
f_shell (NULL),
f_help_dsp_area (NULL),
f_close(NULL),
f_current_ancestor (NULL),
f_form(NULL),
f_preview_timeout (NULL),
f_serial_number(serial_no),
f_history_display (FALSE),
f_vscrollbar_offset(0),
f_hscrollbar_offset(0),
f_graphic_segment(NULL),
f_graphics_handler(NULL),
f_close_sensitive(FALSE),
f_frame(NULL),
f_create_bmrk(NULL),
f_create_anno(NULL),
@@ -810,10 +800,20 @@ NodeWindowAgent::NodeWindowAgent (u_int serial_no)
f_print(NULL),
f_print2(NULL),
f_print_as(NULL),
f_current_ancestor (NULL),
f_form(NULL),
f_move_mark_sensitive(0),
f_last_access_time(0),
f_locked(FALSE),
f_wm_delete_callback(NULL)
f_wm_delete_callback(NULL),
f_preview_timeout (NULL),
f_serial_number(serial_no),
f_history_display (FALSE),
f_vscrollbar_offset(0),
f_hscrollbar_offset(0),
f_graphic_segment(NULL),
f_graphics_handler(NULL),
f_close_sensitive(FALSE)
{
UAS_Common::request ((UAS_Receiver<UAS_LibraryDestroyedMsg> *) this);

View File

@@ -151,9 +151,8 @@ static Boolean print_hierarchy; // keep track of hierarchy vs section
#if 0 && defined(PRINTING_SUPPORTED)
static void PrintEverything(AppPrintData *p);
#endif /* PRINTING_SUPPORTED */
static void PrintOneUASCommon(UAS_Pointer<UAS_Common> &doc, Widget pshell, int *cur_pageP);
#endif /* PRINTING_SUPPORTED */
PrintPanelAgent::PrintPanelAgent()
{
@@ -963,7 +962,6 @@ PrintEverything(AppPrintData *p)
RCS_DEBUG("PrintEverything exiting.\n");
}
#endif /* PRINTING_SUPPORTED */
static void
PrintOneUASCommon(UAS_Pointer<UAS_Common> &doc, Widget pshell, int *cur_pageP)
@@ -1030,6 +1028,7 @@ PrintOneUASCommon(UAS_Pointer<UAS_Common> &doc, Widget pshell, int *cur_pageP)
}
}
}
#endif /* PRINTING_SUPPORTED */
/*
* ------------------------------------------------------------------------

View File

@@ -115,9 +115,9 @@ protected: // variables
inline
SearchResultsAgent::SearchResultsAgent()
: f_work_proc_id (0), f_popped_up(FALSE), f_my_ale(NULL), f_retain(FALSE),
f_results(NULL), f_selected_item(0), f_retain_toggle(NULL), f_query_text(NULL),
f_hits_label(NULL), f_scope_label(NULL), f_docs_to_display(0), f_count(0),
f_scale(0), f_header_indent(0)
: f_my_ale(NULL), f_retain(FALSE), f_results(NULL), f_selected_item(0),
f_retain_toggle(NULL), f_query_text(NULL), f_hits_label(NULL),
f_scope_label(NULL), f_docs_to_display(0), f_count(0), f_scale(0),
f_work_proc_id(0), f_popped_up(FALSE), f_header_indent(0)
{
}

View File

@@ -75,8 +75,8 @@ public:
void write (const int integer);
void write (const size_t integer)
{ write ((size_t) ((void *) integer)); }
void write (const unsigned int integer)
{ write ((int) (integer)); }
void write (const char *string);
void write (const char *bytes, u_int size, u_int length);

View File

@@ -121,8 +121,6 @@ List::append (FolioObject &element)
check_space();
/* -------- Add the element. -------- */
if (&element == NULL)
abort();
f_list_element[f_length] = &element;
f_length++;
notify (APPENDED, (void *)(size_t) (f_length - 1));

View File

@@ -429,7 +429,7 @@ olias_send_event (Widget, OliasEvent *event)
if (locator == NULL)
return (OLIAS_TIMEOUT);
ON_DEBUG(printf(">>> g_top_locator = %p\n", g_top_locator));
if (g_top_locator == NULL)
if (g_top_locator[0] == '\0')
return (OLIAS_TIMEOUT);
g_scroll_to_locator = TRUE;
len = MIN(strlen(locator), 4096 - 1);

View File

@@ -231,16 +231,16 @@ print_justify (unsigned value)
CanvasRenderer::CanvasRenderer(int font_scale)
: Renderer(),
f_vcc(0),
f_current_container(NULL),
f_current_displayable(NULL),
f_current_tgroup (0),
f_font (0),
f_link_idx (-1),
f_font_scale(font_scale),
f_default_features(NULL),
fBogusSymbol(gElemSymTab->intern("%BOGUS")),
f_level(0),
f_vcc(0),
f_current_container(NULL),
f_current_displayable(NULL),
f_default_features(NULL)
f_level(0)
{
// make symbols
for ( int i=0; i < REND_SYMBOLS; i++)
@@ -2534,7 +2534,7 @@ TGDefn::build()
delete grid[r] ; // clean up column memory
}
delete grid ;
delete [] grid ;
// now apply the formats to the _DtCvTable
{

View File

@@ -226,8 +226,8 @@ public:
Shell_Info (Widget w)
: f_shell (w),
f_size_hints (NULL),
f_restore (False),
f_has_size_hints(False),
f_restore (False),
f_iconic(False),
f_has_wm_state(False)
{ }
@@ -247,22 +247,22 @@ public:
// /////////////////////////////////////////////////////////////////
WindowSystem::WindowSystem (int &argc, char *argv[])
: f_printing(False),
: f_print_display(NULL),
f_printing(False),
f_default_pixmap (0),
f_default_print_pixmap(0),
f_defpix_width (0),
f_defpix_height (0),
f_detached_pixmap(0),
f_shell_list (20),
f_cursor_stack_pos(-1),
f_dtinfo_font(NULL),
f_dtinfo_space_font(NULL),
f_print_display(NULL),
f_default_print_pixmap(0),
f_print_defpix_width(0),
f_print_defpix_height(0),
f_detached_pixmap(0),
f_detached_width(0),
f_detached_height(0),
f_print_screen(NULL)
f_shell_list (20),
f_cursor_stack_pos(-1),
f_print_screen(NULL),
f_dtinfo_font(NULL),
f_dtinfo_space_font(NULL)
{
f_argc = &argc;
f_argv = argv;

View File

@@ -105,8 +105,8 @@ QueryEditor::QueryEditor(UAS_SearchEngine& search_engine)
: f_query (NULL),
f_query_view (NULL),
f_shell (NULL),
f_null_terms (0),
f_min_term_width(0)
f_min_term_width(0),
f_null_terms (0)
{
f_query_editor = this;