Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix some pesky compiler warnings #33

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 11 additions & 9 deletions src/microrl.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,14 @@ static int hist_restore_line (ring_history_t * pThis, char * line, int dir)
{
int cnt = 0;
// count history record
int header = pThis->begin;
while (pThis->ring_buf [header] != 0) {
header += pThis->ring_buf [header] + 1;
if (header >= _RING_HISTORY_LEN)
header -= _RING_HISTORY_LEN;
cnt++;
{
int header = pThis->begin;
while (pThis->ring_buf [header] != 0) {
header += pThis->ring_buf [header] + 1;
if (header >= _RING_HISTORY_LEN)
header -= _RING_HISTORY_LEN;
cnt++;
}
}

if (dir == _HIST_UP) {
Expand Down Expand Up @@ -470,10 +472,10 @@ static void microrl_backspace (microrl_t * pThis)
//*****************************************************************************
static int common_len (char ** arr)
{
int i;
size_t i;
int j;
char *shortest = arr[0];
int shortlen = strlen(shortest);
size_t shortlen = strlen(shortest);

for (i = 0; arr[i] != NULL; ++i)
if (strlen(arr[i]) < shortlen) {
Expand Down Expand Up @@ -533,7 +535,7 @@ static void microrl_get_complite (microrl_t * pThis)
#endif

//*****************************************************************************
void new_line_handler(microrl_t * pThis){
static void new_line_handler(microrl_t * pThis){
char const * tkn_arr [_COMMAND_TOKEN_NMB];
int status;

Expand Down