[patch] fixed compilation warnings on Linux x86_64

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[patch] fixed compilation warnings on Linux x86_64

Dominique Pellé
Hi

When compiling Vim-7.3a 2221:f5bd6753cdc4 on Linux x86_64
with gcc-4.5.0, I see the following warnings:

undo.c: In function ‘u_read_undo’:
undo.c:945:24: warning: cast to pointer from integer of different size
undo.c:946:24: warning: cast to pointer from integer of different size
undo.c:947:28: warning: cast to pointer from integer of different size
undo.c:948:28: warning: cast to pointer from integer of different size
undo.c:879:10: warning: ignoring return value of ‘fread’, declared
with attribute warn_unused_result

Warnings at lines 945, 946, 947, 948 were introduced recently
in changeset 2207:120502692d82.

Attached patch silences the warnings.

Regards
-- Dominique

--
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

fixed-warnings-x86_64-undo.c.7.3a.patch (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [patch] fixed compilation warnings on Linux x86_64

Bram Moolenaar

Dominique Pelle wrote:

> When compiling Vim-7.3a 2221:f5bd6753cdc4 on Linux x86_64
> with gcc-4.5.0, I see the following warnings:
>
> undo.c: In function =91u_read_undo=92:
> undo.c:945:24: warning: cast to pointer from integer of different size
> undo.c:946:24: warning: cast to pointer from integer of different size
> undo.c:947:28: warning: cast to pointer from integer of different size
> undo.c:948:28: warning: cast to pointer from integer of different size
> undo.c:879:10: warning: ignoring return value of =91fread=92, declared
> with attribute warn_unused_result
>
> Warnings at lines 945, 946, 947, 948 were introduced recently
> in changeset 2207:120502692d82.
>
> Attached patch silences the warnings.

Thanks, I'll include it.  We can use the same error as just above.

If you work on the undo code, please sync first.  I moved some things
around.  I'm going to check all the code for proper working, there might
be a few details wrong.

--
An actual excerpt from a classified section of a city newspaper:
"Illiterate?  Write today for free help!"

 /// Bram Moolenaar -- [hidden email] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

--
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