From: abellenir Date: Sun, 27 Jul 2014 02:00:00 +0000 (+0000) Subject: fix some compiler warnings X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=1713b75178c6b2e2916ce0e3cc88dcf484045c5b;p=archive%2Fafm.git fix some compiler warnings --- diff --git a/source/screen.c b/source/screen.c index 1e38838..ccabe5c 100644 --- a/source/screen.c +++ b/source/screen.c @@ -15,6 +15,10 @@ #include "aardvark.h" #include "workdir.h" +//number of lines to leave before/after dir contents in frame +static int FrameTopBuffer = 2; +static int FrameBotBuffer = 2; + static void screen_place_windows(void); static frame_t* screen_frame_new(void); static void screen_frame_free(void* p_frame); @@ -144,6 +148,7 @@ static int count_double_lines(frame_t* p_frame){ static void screen_frame_scroll(frame_t* p_frame){ int rows,cols; getmaxyx(p_frame->p_win, rows, cols); + (void) cols; if(p_frame->workdir->idx < p_frame->top_index){ p_frame->top_index = p_frame->workdir->idx; }else{ @@ -156,7 +161,6 @@ static void screen_frame_scroll(frame_t* p_frame){ void screen_frame_draw_files(frame_t* frame){ int file_i, frame_i = FrameTopBuffer; int rows, cols; - int pathlength = strlen(frame->workdir->path); getmaxyx(frame->p_win, rows, cols); screen_frame_scroll(frame); file_i = frame->top_index; @@ -187,6 +191,7 @@ void screen_frame_draw_files(frame_t* frame){ int realrows(frame_t* p_frame){ int rows, cols; getmaxyx(p_frame->p_win, rows, cols); + (void) cols; return rows - FrameTopBuffer - FrameBotBuffer; } void screen_frame_page_up(frame_t* p_frame){ diff --git a/source/screen.h b/source/screen.h index ff9a960..82dc985 100644 --- a/source/screen.h +++ b/source/screen.h @@ -16,10 +16,6 @@ void screen_update(void); void screen_open(void); void screen_close(void); -//number of lines to leave before/after dir contents in frame -static int FrameTopBuffer = 2; -static int FrameBotBuffer = 2; - typedef struct { WINDOW* p_win; WorkDir_T* workdir;