From 9d44b75ad5490a39cf9201fe442b45d5820823bb Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Sat, 21 May 2005 03:26:36 +0000 Subject: [PATCH] * find.c: Fix warnings reported by gcc 4.0.0. * mountlist.c: Likewise. * screen.c: Likewise. * view.c: Likewise. --- src/ChangeLog | 5 +++++ src/find.c | 2 +- src/mountlist.c | 1 + src/screen.c | 2 +- src/view.c | 6 +++--- 5 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 080d1568a..6c67c7e00 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,10 @@ 2005-05-20 Pavel Roskin + * find.c: Fix warnings reported by gcc 4.0.0. + * mountlist.c: Likewise. + * screen.c: Likewise. + * view.c: Likewise. + * dialog.c (dlg_select_widget): Remove first argument, it's redundant. Adjust all callers. (dlg_replace_widget): Likewise. diff --git a/src/find.c b/src/find.c index cd281c978..595daa2e7 100644 --- a/src/find.c +++ b/src/find.c @@ -1067,7 +1067,7 @@ find_file (char *start_dir, char *pattern, char *content, char **dirname, void do_find (void) { - char *start_dir, *pattern, *content; + char *start_dir = NULL, *pattern = NULL, *content = NULL; char *filename, *dirname; int v, dir_and_file_set; regex_t rx; /* Compiled content_pattern to search inside files */ diff --git a/src/mountlist.c b/src/mountlist.c index df00f29e4..69adc8714 100644 --- a/src/mountlist.c +++ b/src/mountlist.c @@ -609,6 +609,7 @@ my_statfs (struct my_statfs *myfs_stats, const char *path) } if (entry){ + memset (&fs_use, 0, sizeof (struct fs_usage)); get_fs_usage (entry->me_mountdir, &fs_use); myfs_stats->type = entry->me_dev; diff --git a/src/screen.c b/src/screen.c index 9e479d406..8989a2d50 100644 --- a/src/screen.c +++ b/src/screen.c @@ -1329,7 +1329,7 @@ use_display_format (WPanel *panel, const char *format, char **error, int isstatu #define MAX_EXPAND 4 int expand_top = 0; /* Max used element in expand */ int usable_columns; /* Usable columns in the panel */ - int total_cols; + int total_cols = 0; const char *expand_list [MAX_EXPAND]; /* Expand at most 4 fields. */ int i; format_e *darr, *home; diff --git a/src/view.c b/src/view.c index 4bbf91615..0b5c71db0 100644 --- a/src/view.c +++ b/src/view.c @@ -739,7 +739,7 @@ view_percent (WView *view, offset_type p) { const int xpos = view->widget.cols - view->dpy_frame_size - 4; int percent; - gboolean exact; + gboolean exact = FALSE; offset_type filesize; filesize = view_get_filesize_with_exact (view, &exact); @@ -793,7 +793,7 @@ view_status (WView *view) } if (w > 62) { offset_type filesize; - gboolean exact; + gboolean exact = FALSE; filesize = view_get_filesize_with_exact (view, &exact); widget_move (view, view->dpy_frame_size, view->dpy_frame_size + 43); if (exact) { @@ -1606,7 +1606,7 @@ search (WView *view, char *text, /* the position returned after the line has been read */ offset_type forward_line_start; offset_type reverse_line_start; - offset_type t; + offset_type t = 0; /* Clear interrupt status */ got_interrupt ();