Hi,

On Tue, Sep 8, 2015 at 10:59 PM, Yegappan Lakshmanan
<[email protected]> wrote:
> Hi,
>
> On Tue, Sep 8, 2015 at 8:30 PM, h_east <[email protected]> wrote:
>> Hi Tony and Yegappan!
>>
>> 2015-9-9(Wed) 11:24:19 UTC+9 Tony Mechelynck:
>>> On Wednesday, September 9, 2015 at 3:48:26 AM UTC+2, [email protected] 
>>> wrote:
>>> > Hi,
>>> >
>>> > The patch to fix the build problems with the tiny build is attached.
>>> >
>>> > - Yegappan
>>> >
>>>
>>> With this patch, the tiny build succeeds, with the following warning:
>>>
>>> gcc -c -I. -Iproto -DHAVE_CONFIG_H     -O2 -fno-strength-reduce -Wall 
>>> -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1        -o objects/move.o move.c
>>> move.c: In function ‘scroll_cursor_top’:
>>> move.c:1775:7: warning: ‘i’ may be used uninitialized in this function 
>>> [-Wmaybe-uninitialized]
>>>   used += i;
>>>        ^
>>
>> I think src/move.c may be modified as below.
>> What do you think?
>>
>
> Yes. I agree. Your change is the correct fix for this build issue
> with move.c.
>
> - Yegappan
>

To make it easier for Bram to apply the patch, the combined patch to
ex_docmd.c and
move.c to fix the tiny build breakage is attached.

- Yegappan


>>
>> --
>> Best regards,
>> Hirohito Higashi (a.k.a h_east)
>>

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index 35b6637..8ea4ec3 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -2173,9 +2173,11 @@ do_one_cmd(cmdlinep, sourcing,
                lnum = CURRENT_TAB_NR;
                ea.line2 = lnum;
                break;
+#ifdef FEAT_QUICKFIX
            case ADDR_QUICKFIX:
                ea.line2 = qf_get_cur_valid_idx(&ea);
                break;
+#endif
        }
        ea.cmd = skipwhite(ea.cmd);
        lnum = get_address(&ea, &ea.cmd, ea.addr_type, ea.skip, ea.addr_count 
== 0);
@@ -2236,12 +2238,14 @@ do_one_cmd(cmdlinep, sourcing,
                            ea.line2 = ARGCOUNT;
                        }
                        break;
+#ifdef FEAT_QUICKFIX
                    case ADDR_QUICKFIX:
                        ea.line1 = 1;
                        ea.line2 = qf_get_size(&ea);
                        if (ea.line2 == 0)
                            ea.line2 = 1;
                        break;
+#endif
                }
                ++ea.addr_count;
            }
@@ -2702,11 +2706,13 @@ do_one_cmd(cmdlinep, sourcing,
                else
                    ea.line2 = ARGCOUNT;
                break;
+#ifdef FEAT_QUICKFIX
            case ADDR_QUICKFIX:
                ea.line2 = qf_get_size(&ea);
                if (ea.line2 == 0)
                    ea.line2 = 1;
                break;
+#endif
        }
     }
 
@@ -4381,9 +4387,11 @@ get_address(eap, ptr, addr_type, skip, to_other_file)
                    case ADDR_TABS:
                        lnum = CURRENT_TAB_NR;
                        break;
+#ifdef FEAT_QUICKFIX
                    case ADDR_QUICKFIX:
                        lnum = qf_get_cur_valid_idx(eap);
                        break;
+#endif
                }
                break;
 
@@ -4416,11 +4424,13 @@ get_address(eap, ptr, addr_type, skip, to_other_file)
                    case ADDR_TABS:
                        lnum = LAST_TAB_NR;
                        break;
+#ifdef FEAT_QUICKFIX
                    case ADDR_QUICKFIX:
                        lnum = qf_get_size(eap);
                        if (lnum == 0)
                            lnum = 1;
                        break;
+#endif
                }
                break;
 
@@ -4596,9 +4606,11 @@ get_address(eap, ptr, addr_type, skip, to_other_file)
                    case ADDR_TABS:
                        lnum = CURRENT_TAB_NR;
                        break;
+#ifdef FEAT_QUICKFIX
                    case ADDR_QUICKFIX:
                        lnum = qf_get_cur_valid_idx(eap);
                        break;
+#endif
                }
            }
 
@@ -4737,10 +4749,12 @@ invalid_range(eap)
                if (eap->line2 > LAST_TAB_NR)
                    return (char_u *)_(e_invrange);
                break;
+#ifdef FEAT_QUICKFIX
            case ADDR_QUICKFIX:
                if (eap->line2 != 1 && eap->line2 > qf_get_size(eap))
                    return (char_u *)_(e_invrange);
                break;
+#endif
        }
     }
     return NULL;
diff --git a/src/move.c b/src/move.c
index 449382f..4c9a38d 100644
--- a/src/move.c
+++ b/src/move.c
@@ -1769,7 +1769,11 @@ scroll_cursor_top(min_scroll, always)
            i = 1;
        else
 #endif
+#ifdef FEAT_DIFF
            i = plines_nofill(top);
+#else
+           i = plines(top);
+#endif
        used += i;
        if (extra + i <= off && bot < curbuf->b_ml.ml_line_count)
        {

Raspunde prin e-mail lui