Ticket #168: 168_unused_uninitialised_vars.patch

File 168_unused_uninitialised_vars.patch, 1.2 KB (added by slavazanko, 16 years ago)

Some additionals to branch

  • edit/editdraw.c

    diff --git a/edit/editdraw.c b/edit/editdraw.c
    index f0951f4..40f6925 100644
    a b edit_draw_this_line (WEdit *edit, long b, long row, long start_col, 
    282282{ 
    283283    static unsigned int line[MAX_LINE_LEN]; 
    284284    unsigned int *p = line; 
    285     long m1 = 0, m2 = 0, q, c1, c2, tws; 
     285    long m1 = 0, m2 = 0, q, c1, c2; 
    286286    int col, start_col_real; 
    287287    unsigned int c; 
    288288    int color; 
    edit_draw_this_line (WEdit *edit, long b, long row, long start_col, 
    300300        eval_marks (edit, &m1, &m2); 
    301301 
    302302        if (row <= edit->total_lines - edit->start_line) { 
     303            long tws = 0; 
    303304            if (use_colors && visible_tws) { 
    304305                tws = edit_eol (edit, b); 
    305306                while (tws > b && ((c = edit_get_byte (edit, tws - 1)) == ' ' 
  • edit/editlock.c

    diff --git a/edit/editlock.c b/edit/editlock.c
    index fb945f2..89374e7 100644
    a b lock_get_info (const char *lockfname) 
    142142    int cnt; 
    143143    static char buf[BUF_SIZE]; 
    144144 
    145     if ((cnt = readlink (lockfname, buf, BUF_SIZE - 1)) == -1 || !*buf) 
     145    cnt = readlink (lockfname, buf, BUF_SIZE - 1); 
     146 
     147    if (cnt == -1 || buf ==NULL || !*buf) 
    146148        return NULL; 
    147149    buf[cnt] = '\0'; 
    148150    return buf;