Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@kanatohodets
Created January 22, 2014 23:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kanatohodets/c3e26a60ff067706d2a4 to your computer and use it in GitHub Desktop.
Save kanatohodets/c3e26a60ff067706d2a4 to your computer and use it in GitHub Desktop.
build error with patch applied
17:45:59 [~/prog/6perl/MoarVM] btyler$ gs
On branch master
Your branch is up-to-date with 'origin/master'.
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: src/6model/reprs/MVMOSHandle.h
modified: src/io/fileops.c
Untracked files:
(use "git add <file>..." to include in what will be committed)
io.diff
nqp-cc/
no changes added to commit (use "git add" and/or "git commit -a")
17:45:59 [~/prog/6perl/MoarVM] btyler$ make
compiling src/main.o
compiling src/core/args.o
compiling src/core/exceptions.o
src/core/exceptions.c:219:11: warning: initializing 'char *' with an expression of type 'MVMuint8 *' (aka 'unsigned char *') converts between pointers
to integer types with different sign [-Wpointer-sign]
char *tmp1 = annot && string_heap_index < cur_frame->static_info->body.cu->body.num_strings
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
compiling src/core/interp.o
compiling src/core/threadcontext.o
compiling src/core/compunit.o
compiling src/core/bytecode.o
src/core/bytecode.c:132:39: warning: passing 'char *' to parameter of type 'MVMuint8 *' (aka 'unsigned char *') converts between pointers to integer
types with different sign [-Wpointer-sign]
MVMuint32 heap_index = read_int32(buffer, offset);
^~~~~~
src/core/bytecode.c:84:39: note: passing argument to parameter 'buffer' here
static MVMuint32 read_int32(MVMuint8 *buffer, size_t offset) {
^
src/core/bytecode.c:216:29: warning: assigning to 'char *' from 'MVMuint8 *' (aka 'unsigned char *') converts between pointers to integer types with
different sign [-Wpointer-sign]
cu_body->serialized = cu_body->data_start + offset;
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/core/bytecode.c:280:95: warning: passing 'MVMuint8 *' (aka 'unsigned char *') to parameter of type 'const char *' converts between pointers to
integer types with different sign [-Wpointer-sign]
MVM_ASSIGN_REF(tc, cu, strings[i], MVM_string_utf8_decode(tc, tc->instance->VMString, pos, ss));
^~~
src/gc/wb.h:18:20: note: expanded from macro 'MVM_ASSIGN_REF'
void *_r = referenced; \
^
src/strings/utf8.h:1:105: note: passing argument to parameter 'utf8' here
MVM_PUBLIC MVMString * MVM_string_utf8_decode(MVMThreadContext *tc, MVMObject *result_type, const char *utf8, size_t bytes);
^
src/core/bytecode.c:523:96: warning: passing 'MVMuint8 *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer
types with different sign [-Wpointer-sign]
MVM_ASSIGN_REF(tc, static_frame, static_frame_body->cuuid, get_heap_string(tc, cu, rs, pos, 16));
^~~
src/gc/wb.h:18:20: note: expanded from macro 'MVM_ASSIGN_REF'
void *_r = referenced; \
^
src/core/bytecode.c:130:98: note: passing argument to parameter 'buffer' here
static MVMString * get_heap_string(MVMThreadContext *tc, MVMCompUnit *cu, ReaderState *rs, char *buffer, size_t offset) {
^
src/core/bytecode.c:524:95: warning: passing 'MVMuint8 *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer
types with different sign [-Wpointer-sign]
MVM_ASSIGN_REF(tc, static_frame, static_frame_body->name, get_heap_string(tc, cu, rs, pos, 20));
^~~
src/gc/wb.h:18:20: note: expanded from macro 'MVM_ASSIGN_REF'
void *_r = referenced; \
^
src/core/bytecode.c:130:98: note: passing argument to parameter 'buffer' here
static MVMString * get_heap_string(MVMThreadContext *tc, MVMCompUnit *cu, ReaderState *rs, char *buffer, size_t offset) {
^
src/core/bytecode.c:570:63: warning: passing 'MVMuint8 *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer
types with different sign [-Wpointer-sign]
MVMString *name = get_heap_string(tc, cu, rs, pos, 6 * j + 2);
^~~
src/core/bytecode.c:130:98: note: passing argument to parameter 'buffer' here
static MVMString * get_heap_string(MVMThreadContext *tc, MVMCompUnit *cu, ReaderState *rs, char *buffer, size_t offset) {
^
src/core/bytecode.c:778:40: warning: comparison of unsigned expression >= 0 is always true [-Wtautological-compare]
if (sfb->num_annotations && offset >= 0 && offset < sfb->bytecode_size) {
~~~~~~ ^ ~
src/core/bytecode.c:779:18: warning: initializing 'MVMint8 *' (aka 'signed char *') with an expression of type 'MVMuint8 *' (aka 'unsigned char *')
converts between pointers to integer types with different sign [-Wpointer-sign]
MVMint8 *cur_anno = sfb->annotations_data;
^ ~~~~~~~~~~~~~~~~~~~~~
src/core/bytecode.c:781:46: warning: passing 'MVMint8 *' (aka 'signed char *') to parameter of type 'MVMuint8 *' (aka 'unsigned char *') converts
between pointers to integer types with different sign [-Wpointer-sign]
MVMint32 ann_offset = read_int32(cur_anno, 0);
^~~~~~~~
src/core/bytecode.c:84:39: note: passing argument to parameter 'buffer' here
static MVMuint32 read_int32(MVMuint8 *buffer, size_t offset) {
^
src/core/bytecode.c:789:42: warning: passing 'MVMint8 *' (aka 'signed char *') to parameter of type 'MVMuint8 *' (aka 'unsigned char *') converts
between pointers to integer types with different sign [-Wpointer-sign]
ba->bytecode_offset = read_int32(cur_anno, 0);
^~~~~~~~
src/core/bytecode.c:84:39: note: passing argument to parameter 'buffer' here
static MVMuint32 read_int32(MVMuint8 *buffer, size_t offset) {
^
src/core/bytecode.c:790:53: warning: passing 'MVMint8 *' (aka 'signed char *') to parameter of type 'MVMuint8 *' (aka 'unsigned char *') converts
between pointers to integer types with different sign [-Wpointer-sign]
ba->filename_string_heap_index = read_int32(cur_anno, 4);
^~~~~~~~
src/core/bytecode.c:84:39: note: passing argument to parameter 'buffer' here
static MVMuint32 read_int32(MVMuint8 *buffer, size_t offset) {
^
src/core/bytecode.c:791:38: warning: passing 'MVMint8 *' (aka 'signed char *') to parameter of type 'MVMuint8 *' (aka 'unsigned char *') converts
between pointers to integer types with different sign [-Wpointer-sign]
ba->line_number = read_int32(cur_anno, 8);
^~~~~~~~
src/core/bytecode.c:84:39: note: passing argument to parameter 'buffer' here
static MVMuint32 read_int32(MVMuint8 *buffer, size_t offset) {
^
12 warnings generated.
compiling src/core/frame.o
compiling src/core/validation.o
compiling src/core/bytecodedump.o
compiling src/core/threads.o
compiling src/core/ops.o
compiling src/core/hll.o
compiling src/core/loadbytecode.o
compiling src/math/num.o
compiling src/core/coerce.o
src/core/coerce.c:223:15: warning: initializing 'char *' with an expression of type 'MVMuint8 *' (aka 'unsigned char *') converts between pointers to
integer types with different sign [-Wpointer-sign]
char *enc = MVM_string_ascii_encode(tc, s, NULL);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/core/coerce.c:230:15: warning: initializing 'char *' with an expression of type 'MVMuint8 *' (aka 'unsigned char *') converts between pointers to
integer types with different sign [-Wpointer-sign]
char *enc = MVM_string_ascii_encode(tc, s, NULL);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 warnings generated.
compiling src/core/dll.o
compiling src/core/ext.o
compiling src/core/continuation.o
compiling src/gen/config.o
compiling src/gc/orchestrate.o
compiling src/gc/allocation.o
compiling src/gc/worklist.o
compiling src/gc/roots.o
compiling src/io/fileops.o
src/io/fileops.c:646:48: warning: passing 'MVMint64 *' (aka 'long long *') to parameter of type 'MVMuint64 *' (aka 'unsigned long long *') converts
between pointers to integer types with different sign [-Wpointer-sign]
output = MVM_string_encode(tc, str, 0, -1, &output_size, handle->body.encoding_type);
^~~~~~~~~~~~
src/strings/ops.h:83:110: note: passing argument to parameter 'output_size' here
MVMuint8 * MVM_string_encode(MVMThreadContext *tc, MVMString *s, MVMint64 start, MVMint64 length, MVMuint64 *output_size, MVMint64 encoding_flag);
^
src/io/fileops.c:656:40: warning: passing 'MVMuint8 *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types
with different sign [-Wpointer-sign]
uv_buf_t buf = uv_buf_init(output, bytes_written = output_size);
^~~~~~
3rdparty/libuv/include/uv.h:576:38: note: passing argument to parameter 'base' here
UV_EXTERN uv_buf_t uv_buf_init(char* base, unsigned int len);
^
src/io/fileops.c:701:12: warning: assigning to 'MVMuint8 *' (aka 'unsigned char *') from 'MVMint8 *' (aka 'signed char *') converts between pointers to
integer types with different sign [-Wpointer-sign]
output = ((MVMArray *)buffer)->body.slots.i8;
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/io/fileops.c:707:40: warning: passing 'MVMuint8 *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types
with different sign [-Wpointer-sign]
uv_buf_t buf = uv_buf_init(output, bytes_written = output_size);
^~~~~~
3rdparty/libuv/include/uv.h:576:38: note: passing argument to parameter 'base' here
UV_EXTERN uv_buf_t uv_buf_init(char* base, unsigned int len);
^
src/io/fileops.c:988:47: warning: '&&' within '||' [-Wlogical-op-parentheses]
orig_cstr[1] == ':' && orig_cstr[2] == '\\';
~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
src/io/fileops.c:988:47: note: place parentheses around the '&&' expression to silence this warning
orig_cstr[1] == ':' && orig_cstr[2] == '\\';
^
( )
5 warnings generated.
compiling src/io/socketops.o
src/io/socketops.c:52:47: warning: incompatible pointer types passing 'struct sockaddr_in *' to parameter of type 'const struct sockaddr *'
[-Wincompatible-pointer-types]
if ((r = uv_tcp_connect(&connect, socket, &dest, NULL)) < 0) {
^~~~~
3rdparty/libuv/include/uv.h:819:53: note: passing argument to parameter 'addr' here
const struct sockaddr* addr,
^
src/io/socketops.c:113:43: error: too few arguments to function call, expected 3, have 2
uv_tcp_bind(server, &bind_addr);
~~~~~~~~~~~ ^
3rdparty/libuv/include/uv.h:801:1: note: 'uv_tcp_bind' declared here
UV_EXTERN int uv_tcp_bind(uv_tcp_t* handle,
^
3rdparty/libuv/include/uv.h:43:20: note: expanded from macro 'UV_EXTERN'
# define UV_EXTERN __attribute__((visibility("default")))
^
src/io/socketops.c:124:33: warning: incompatible pointer types passing 'struct sockaddr_in *' to parameter of type 'const struct sockaddr *'
[-Wincompatible-pointer-types]
uv_udp_bind(server, &bind_addr, 0);
^~~~~~~~~~
3rdparty/libuv/include/uv.h:931:50: note: passing argument to parameter 'addr' here
const struct sockaddr* addr,
^
src/io/socketops.c:188:59: warning: passing 'MVMint64 *' (aka 'long long *') to parameter of type 'MVMuint64 *' (aka 'unsigned long long *') converts
between pointers to integer types with different sign [-Wpointer-sign]
output = MVM_string_encode(tc, tosend, start, length, &output_size, handle->body.encoding_type);
^~~~~~~~~~~~
src/strings/ops.h:83:110: note: passing argument to parameter 'output_size' here
MVMuint8 * MVM_string_encode(MVMThreadContext *tc, MVMString *s, MVMint64 start, MVMint64 length, MVMuint64 *output_size, MVMint64 encoding_flag);
^
src/io/socketops.c:190:14: warning: assigning to 'char *' from 'MVMuint8 *' (aka 'unsigned char *') converts between pointers to integer types with
different sign [-Wpointer-sign]
buf.base = output;
^ ~~~~~~
src/io/socketops.c:270:5: warning: implicit declaration of function 'gethostname' is invalid in C99 [-Wimplicit-function-declaration]
gethostname(hostname, 65);
^
5 warnings and 1 error generated.
make: *** [src/io/socketops.o] Error 1
17:46:13 [~/prog/6perl/MoarVM] btyler$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment