Björn Winckler wrote: > 2010/6/9 Dominique Pellé: > > björn wrote: > > > >> $ gcc --version > >> i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5659) > >> > >> All I can say is that if you want to print an off_t value on OS X 10.6 > >> then "%lld" must be used or that warning pops up. > >> > >> Since those two lines in fileio.c are the only places where an off_t > >> is printed I may just go ahead and add some MacVim-specific #ifdefs to > >> get rid of the warning in the MacVim code, unless some other solution > >> presents itself. I might also try some Apple-specific mailing list to > >> see if I can get any answers there about this warning. > > > > How about putting a cast to long as follows? If LONG_LONG_OFF_T > > is undefined, then casting off_t to long does not lose precision > > and should fix the compilation warning: > > Thanks Dominique, that seems like a clever trick to me. I just tried > it and it works fine (the warning goes away). > > I also made a little test program to print a 64 bit int using %ld as > well as %lld and both give the same result (so this patch works > properly). > > I modified the patch slightly by moving the final parenthesis outside > the #ifdef and added a comment (see below). Bram: would you merge > this into the Vim code or would you rather I just apply it to the > MacVim code?
I'll include it, thanks. -- hundred-and-one symptoms of being an internet addict: 188. You purchase a laptop so you can surf while sitting on the can. /// Bram Moolenaar -- [email protected] -- 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
