]> granicus.if.org Git - vim/commitdiff
Fix compiler warnings on 64 bit systems.
authorBram Moolenaar <Bram@vim.org>
Mon, 26 Jul 2010 20:51:28 +0000 (22:51 +0200)
committerBram Moolenaar <Bram@vim.org>
Mon, 26 Jul 2010 20:51:28 +0000 (22:51 +0200)
src/gui.c
src/normal.c
src/proto/gui.pro
src/quickfix.c

index 49014a532dfd67c5d765086250bf738eb5e92116..20a48d497521b29bd30209d6ad3ebac2ebde867d 100644 (file)
--- a/src/gui.c
+++ b/src/gui.c
@@ -4467,23 +4467,23 @@ gui_update_horiz_scrollbar(force)
  */
     int
 gui_do_horiz_scroll(leftcol, compute_longest_lnum)
-    colnr_T    leftcol;
+    long_u     leftcol;
     int                compute_longest_lnum;
 {
     /* no wrapping, no scrolling */
     if (curwin->w_p_wrap)
        return FALSE;
 
-    if (curwin->w_leftcol == leftcol)
+    if (curwin->w_leftcol == (colnr_T)leftcol)
        return FALSE;
 
-    curwin->w_leftcol = leftcol;
+    curwin->w_leftcol = (colnr_T)leftcol;
 
     /* When the line of the cursor is too short, move the cursor to the
      * longest visible line. */
     if (vim_strchr(p_go, GO_HORSCROLL) == NULL
            && !virtual_active()
-           && leftcol > scroll_line_len(curwin->w_cursor.lnum))
+           && (colnr_T)leftcol > scroll_line_len(curwin->w_cursor.lnum))
     {
        if (compute_longest_lnum)
        {
index d880ee60dd36ca8bccd68c4107352a9c1bd4023d..9e75afc9eb59e4871426a1975f9c0967f9625a8a 100644 (file)
@@ -4582,6 +4582,7 @@ nv_mousescroll(cap)
        if (!curwin->w_p_wrap)
        {
            int val, step = 6;
+
            if (mod_mask & (MOD_MASK_SHIFT | MOD_MASK_CTRL))
                step = W_WIDTH(curwin);
            val = curwin->w_leftcol + (cap->arg == MSCR_RIGHT ? -step : +step);
index fa5ce89441d1e7271e89e5bbbac4f5a4e642115f..29f87ef65d2b113af6fb243b60cec0f6a4b50ebf 100644 (file)
@@ -46,7 +46,7 @@ void gui_drag_scrollbar __ARGS((scrollbar_T *sb, long value, int still_dragging)
 void gui_may_update_scrollbars __ARGS((void));
 void gui_update_scrollbars __ARGS((int force));
 int gui_do_scroll __ARGS((void));
-int gui_do_horiz_scroll __ARGS((colnr_T leftcol, int compute_longest_lnum));
+int gui_do_horiz_scroll __ARGS((long_u leftcol, int compute_longest_lnum));
 void gui_check_colors __ARGS((void));
 guicolor_T gui_get_color __ARGS((char_u *name));
 int gui_get_lightness __ARGS((guicolor_T pixel));
index 883de8c7253e8bd3c475a2c9fe10653d6e239a60..3ecc81c7243a0c7cd565a76824920dc44a767782 100644 (file)
@@ -898,7 +898,7 @@ qf_new_list(qi, qf_title)
     qi->qf_lists[qi->qf_curlist].qf_count = 0;
     if (qf_title != NULL)
     {
-       char_u *p = alloc(STRLEN(qf_title) + 2);
+       char_u *p = alloc((int)STRLEN(qf_title) + 2);
 
        qi->qf_lists[qi->qf_curlist].qf_title = p;
        if (p != NULL)