You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First, Thanks much for ne, a real gem! We are cross-compiling under Buildroot with both 32-bit and 64-bit toolchains.
For the 32-bit toolchain case, I get a handful of warnings because sizeof(char *) and sizeof(int64_t) are different.
As far as I can tell, in this use, these warnings can be safely ignored ... please close this issue if you agree. All occurrences of the warnings are here:
/home/dev/astlinux/trunk/output/host/usr/bin/i586-unknown-linux-gnu-gcc -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -pipe -Os -std=c99 -Wall -Wno-parentheses -D_REGEX_LARGE_OFFSETS -D_GNU_SOURCE -DSTDC_HEADERS -Dinline=__inline__ -O3 -DNDEBUG -c -o buffer.o buffer.c
buffer.c: In function 'create_mmap_files':
buffer.c:1197:36: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
ld_buffer_syn[ld_count].line = (char *)start_of_line;
^
buffer.c:1201:39: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
ld_buffer_no_syn[ld_count].line = (char *)start_of_line;
^
buffer.c:1231:34: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
ld_buffer_syn[ld_count].line = (char *)start_of_line;
^
buffer.c:1235:37: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
ld_buffer_no_syn[ld_count].line = (char *)start_of_line;
^
buffer.c: In function 'load_fd_mmap':
buffer.c:1275:41: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
ld->line = ld->line_len ? char_p + (int64_t)ld->line : NULL;
^
buffer.c:1281:41: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
ld->line = ld->line_len ? char_p + (int64_t)ld->line : NULL;
^
The text was updated successfully, but these errors were encountered:
You're right. Those line of code temporarily store the pointers in line descriptors as integer offsets. Initially the pointers are syntactically too small (32 bit), but the offsets are in a memory-mapped file, so semantically they are 32-bit, too. The last two warnings are actually widening conversions, so there's no problem there.
The real issue is that it doesn't make any sense to have a 32-bit editor with 64-bit line lengths, line numbers and so on, but making this configurable would be a lot of work.
First, Thanks much for
ne
, a real gem! We are cross-compiling under Buildroot with both 32-bit and 64-bit toolchains.For the 32-bit toolchain case, I get a handful of warnings because
sizeof(char *)
andsizeof(int64_t)
are different.As far as I can tell, in this use, these warnings can be safely ignored ... please close this issue if you agree. All occurrences of the warnings are here:
The text was updated successfully, but these errors were encountered: