=> Bootstrap dependency digest>=20010302: found digest-20121220 ===> Building for hydan-0.13nb3 cd libdisasm/src/arch/i386/libdisasm && make libdisasm gcc -I. -O3 -ggdb -I/usr/pkg/include -c libdis.c libdis.c:399:22: warning: comparison of unsigned expression >= 0 is always true [-Wtautological-compare] if ( next_offset >= 0 && ~~~~~~~~~~~ ^ ~ libdis.c:440:22: warning: format specifies type 'unsigned int' but the argument has type 'long' [-Wformat] PRINT_DISPLACEMENT(ea); ~~~~~~~~~~~~~~~~~~~^~~ libdis.c:427:26: note: expanded from macro 'PRINT_DISPLACEMENT' sprintf(str, "0x%X", ea->disp); \ ^ libdis.c:440:22: warning: format specifies type 'int' but the argument has type 'long' [-Wformat] PRINT_DISPLACEMENT(ea); ~~~~~~~~~~~~~~~~~~~^~~ libdis.c:429:24: note: expanded from macro 'PRINT_DISPLACEMENT' sprintf(str, "%d", ea->disp); \ ^ libdis.c:497:23: warning: format specifies type 'unsigned int' but the argument has type 'long' [-Wformat] PRINT_DISPLACEMENT(ea); ~~~~~~~~~~~~~~~~~~~^~~ libdis.c:427:26: note: expanded from macro 'PRINT_DISPLACEMENT' sprintf(str, "0x%X", ea->disp); \ ^ libdis.c:497:23: warning: format specifies type 'int' but the argument has type 'long' [-Wformat] PRINT_DISPLACEMENT(ea); ~~~~~~~~~~~~~~~~~~~^~~ libdis.c:429:24: note: expanded from macro 'PRINT_DISPLACEMENT' sprintf(str, "%d", ea->disp); \ ^ libdis.c:589:28: warning: format specifies type 'unsigned int' but the argument has type 'unsigned long' [-Wformat] sprintf(str, "0x%02X", op->data.sbyte + ~~~~ ^~~~~~~~~~~~~~~~ %02lX libdis.c:592:28: warning: format specifies type 'unsigned int' but the argument has type 'unsigned long' [-Wformat] sprintf(str, "0x%04X", op->data.sword + ~~~~ ^~~~~~~~~~~~~~~~ %04lX libdis.c:595:28: warning: format specifies type 'unsigned int' but the argument has type 'unsigned long' [-Wformat] sprintf(str, "0x%08X", op->data.sdword + ~~~~ ^~~~~~~~~~~~~~~~~ %08lX libdis.c:607:27: warning: format specifies type 'unsigned int' but the argument has type 'long' [-Wformat] sprintf(str, "0x%08X", op->data.sdword ); ~~~~ ^~~~~~~~~~~~~~~ %08lX libdis.c:622:30: warning: format specifies type 'unsigned int' but the argument has type 'long' [-Wformat] sprintf(str, "[0x%08X]", op->data.sdword); ~~~~ ^~~~~~~~~~~~~~~ %08lX libdis.c:624:28: warning: format specifies type 'unsigned int' but the argument has type 'long' [-Wformat] sprintf(str, "0x%08X", op->data.sdword ); ~~~~ ^~~~~~~~~~~~~~~ %08lX libdis.c:551:10: warning: enumeration value 'op_unknown' not handled in switch [-Wswitch] switch( op->type ) { ^ libdis.c:779:27: warning: format specifies type 'unsigned int' but the argument has type 'unsigned long' [-Wformat] sprintf( str, "%08X\t", insn->addr ); ~~~~ ^~~~~~~~~~ %08lX libdis.c:1001:32: warning: format specifies type 'unsigned int' but the argument has type 'long' [-Wformat] snprintf(buf, len, "%012X", operand); ~~~~~ ^~~~~~~ %012lX libdis.c:1127:33: warning: format specifies type 'unsigned int' but the argument has type 'long' [-Wformat] snprintf(str, len, "0x%08X", (long)iop); ~~~~ ^~~~~~~~~ %08lX 15 warnings generated. gcc -I. -O3 -ggdb -I/usr/pkg/include -c i386_invariant.c i386_invariant.c:45:4: warning: implicitly declaring library function 'memset' with type 'void *(void *, int, unsigned int)' memset( i, WILDCARD_BYTE, 4 ); ^ i386_invariant.c:45:4: note: please include the header or explicitly provide a declaration for 'memset' i386_invariant.c:165:6: warning: implicitly declaring library function 'memcpy' with type 'void *(void *, const void *, unsigned int)' memcpy( &out[bytes + modrm], ^ i386_invariant.c:165:6: note: please include the header or explicitly provide a declaration for 'memcpy' i386_invariant.c:217:7: warning: passing 'char *' to parameter of type 'unsigned char *' converts between pointers to integer types with different sign [-Wpointer-sign] &out[size], p); ^~~~~~~~~~ i386_invariant.c:76:74: note: passing argument to parameter 'out' here int disasm_invariant_decode( instr *t, unsigned char *in, unsigned char *out, ^ i386_invariant.c:235:54: warning: passing 'unsigned char [20]' to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign] size = disasm_invariant_tbllookup( bytes, x86_MAIN, buf, 0, inv ); ^~~ i386_invariant.c:181:68: note: passing argument to parameter 'out' here int disasm_invariant_tbllookup( unsigned char *buf, int tbl, char *out, int p, ^ 4 warnings generated. gcc -I. -O3 -ggdb -I/usr/pkg/include -c vm.c vm.c:17:2: warning: implicitly declaring library function 'strncpy' with type 'char *(char *, const char *, unsigned int)' strncpy(ext_arch.reg_table[index].mnemonic, name, 8); ^ vm.c:17:2: note: please include the header or explicitly provide a declaration for 'strncpy' 1 warning generated. gcc -I. -O3 -ggdb -I/usr/pkg/include -c bastard.c bastard.c:22:4: warning: implicitly declaring library function 'memcpy' with type 'void *(void *, const void *, unsigned int)' memcpy( dest, e, sizeof(struct EXPRLIST) ); ^ bastard.c:22:4: note: please include the header or explicitly provide a declaration for 'memcpy' bastard.c:23:4: warning: implicit declaration of function 'free' is invalid in C99 [-Wimplicit-function-declaration] free( e ); ^ bastard.c:40:26: warning: implicitly declaring library function 'calloc' with type 'void *(unsigned int, unsigned int)' e = (struct EXPRLIST *) calloc( sizeof(struct EXPRLIST), 1); ^ bastard.c:40:26: note: please include the header or explicitly provide a declaration for 'calloc' 3 warnings generated. gcc -I. -O3 -ggdb -I/usr/pkg/include -c i386.c i386.c:220:33: warning: passing 'char *' to parameter of type 'BYTE *' (aka 'unsigned char *') converts between pointers to integer types with different sign [-Wpointer-sign] op_get_signsized(&expr->disp, buf, sizeof(char)); ^~~ i386.c:117:47: note: passing argument to parameter 'buf' here static int op_get_signsized(qword *op, BYTE * buf, int size) { ^ i386.c:224:33: warning: passing 'char *' to parameter of type 'BYTE *' (aka 'unsigned char *') converts between pointers to integer types with different sign [-Wpointer-sign] op_get_signsized(&expr->disp, buf, sizeof(short)); ^~~ i386.c:117:47: note: passing argument to parameter 'buf' here static int op_get_signsized(qword *op, BYTE * buf, int size) { ^ i386.c:253:36: warning: passing 'BYTE *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign] count += modrm_getop_16( &expr, &b[1], modrm->mod ); ^~~~~ i386.c:218:57: note: passing argument to parameter 'buf' here static int modrm_getop_16( struct addr_exp *expr, char *buf, int mod ) { ^ i386.c:260:36: warning: passing 'BYTE *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign] count += modrm_getop_16( &expr, &b[1], modrm->mod ); ^~~~~ i386.c:218:57: note: passing argument to parameter 'buf' here static int modrm_getop_16( struct addr_exp *expr, char *buf, int mod ) { ^ i386.c:268:36: warning: passing 'BYTE *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign] count += modrm_getop_16( &expr, &b[1], modrm->mod ); ^~~~~ i386.c:218:57: note: passing argument to parameter 'buf' here static int modrm_getop_16( struct addr_exp *expr, char *buf, int mod ) { ^ i386.c:277:36: warning: passing 'BYTE *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign] count += modrm_getop_16( &expr, &b[1], modrm->mod ); ^~~~~ i386.c:218:57: note: passing argument to parameter 'buf' here static int modrm_getop_16( struct addr_exp *expr, char *buf, int mod ) { ^ i386.c:282:36: warning: passing 'BYTE *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign] count += modrm_getop_16( &expr, &b[1], modrm->mod ); ^~~~~ i386.c:218:57: note: passing argument to parameter 'buf' here static int modrm_getop_16( struct addr_exp *expr, char *buf, int mod ) { ^ i386.c:287:36: warning: passing 'BYTE *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign] count += modrm_getop_16( &expr, &b[1], modrm->mod ); ^~~~~ i386.c:218:57: note: passing argument to parameter 'buf' here static int modrm_getop_16( struct addr_exp *expr, char *buf, int mod ) { ^ i386.c:291:36: warning: passing 'BYTE *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign] count += modrm_getop_16(&expr, &b[1], ^~~~~ i386.c:218:57: note: passing argument to parameter 'buf' here static int modrm_getop_16( struct addr_exp *expr, char *buf, int mod ) { ^ i386.c:298:37: warning: passing 'BYTE *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign] count += modrm_getop_16( &expr, &b[1], ^~~~~ i386.c:218:57: note: passing argument to parameter 'buf' here static int modrm_getop_16( struct addr_exp *expr, char *buf, int mod ) { ^ i386.c:305:36: warning: passing 'BYTE *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign] count += modrm_getop_16( &expr, &b[1], modrm->mod ); ^~~~~ i386.c:218:57: note: passing argument to parameter 'buf' here static int modrm_getop_16( struct addr_exp *expr, char *buf, int mod ) { ^ i386.c:703:39: warning: passing 'unsigned int *' to parameter of type 'int *' converts between pointers to integer types with different sign [-Wpointer-sign] modrm_decode(buf, dest_buf[x], dest_flg[x], g_regs, ^~~~~~~~~~~ i386.c:324:51: note: passing argument to parameter 'op_flags' here static int modrm_decode(BYTE * b, qword *op, int *op_flags, int reg_type, ^ i386.c:710:39: warning: passing 'unsigned int *' to parameter of type 'int *' converts between pointers to integer types with different sign [-Wpointer-sign] modrm_decode(buf, dest_buf[x], dest_flg[x], g_regs, ^~~~~~~~~~~ i386.c:324:51: note: passing argument to parameter 'op_flags' here static int modrm_decode(BYTE * b, qword *op, int *op_flags, int reg_type, ^ i386.c:717:39: warning: passing 'unsigned int *' to parameter of type 'int *' converts between pointers to integer types with different sign [-Wpointer-sign] modrm_decode(buf, dest_buf[x], dest_flg[x], ^~~~~~~~~~~ i386.c:324:51: note: passing argument to parameter 'op_flags' here static int modrm_decode(BYTE * b, qword *op, int *op_flags, int reg_type, ^ i386.c:724:39: warning: passing 'unsigned int *' to parameter of type 'int *' converts between pointers to integer types with different sign [-Wpointer-sign] modrm_decode(buf, dest_buf[x], dest_flg[x], g_regs, ^~~~~~~~~~~ i386.c:324:51: note: passing argument to parameter 'op_flags' here static int modrm_decode(BYTE * b, qword *op, int *op_flags, int reg_type, ^ i386.c:731:39: warning: passing 'unsigned int *' to parameter of type 'int *' converts between pointers to integer types with different sign [-Wpointer-sign] modrm_decode(buf, dest_buf[x], dest_flg[x], ^~~~~~~~~~~ i386.c:324:51: note: passing argument to parameter 'op_flags' here static int modrm_decode(BYTE * b, qword *op, int *op_flags, int reg_type, ^ i386.c:740:35: warning: passing 'unsigned int *' to parameter of type 'int *' converts between pointers to integer types with different sign [-Wpointer-sign] modrm_decode(buf, dest_buf[x], dest_flg[x], ^~~~~~~~~~~ i386.c:324:51: note: passing argument to parameter 'op_flags' here static int modrm_decode(BYTE * b, qword *op, int *op_flags, int reg_type, ^ i386.c:745:35: warning: passing 'unsigned int *' to parameter of type 'int *' converts between pointers to integer types with different sign [-Wpointer-sign] modrm_decode(buf, dest_buf[x], dest_flg[x], ^~~~~~~~~~~ i386.c:324:51: note: passing argument to parameter 'op_flags' here static int modrm_decode(BYTE * b, qword *op, int *op_flags, int reg_type, ^ i386.c:750:35: warning: passing 'unsigned int *' to parameter of type 'int *' converts between pointers to integer types with different sign [-Wpointer-sign] modrm_decode(buf, dest_buf[x], dest_flg[x], g_regs, ^~~~~~~~~~~ i386.c:324:51: note: passing argument to parameter 'op_flags' here static int modrm_decode(BYTE * b, qword *op, int *op_flags, int reg_type, ^ i386.c:755:35: warning: passing 'unsigned int *' to parameter of type 'int *' converts between pointers to integer types with different sign [-Wpointer-sign] modrm_decode(buf, dest_buf[x], dest_flg[x], ^~~~~~~~~~~ i386.c:324:51: note: passing argument to parameter 'op_flags' here static int modrm_decode(BYTE * b, qword *op, int *op_flags, int reg_type, ^ i386.c:760:35: warning: passing 'unsigned int *' to parameter of type 'int *' converts between pointers to integer types with different sign [-Wpointer-sign] modrm_decode(buf, dest_buf[x], dest_flg[x], ^~~~~~~~~~~ i386.c:324:51: note: passing argument to parameter 'op_flags' here static int modrm_decode(BYTE * b, qword *op, int *op_flags, int reg_type, ^ i386.c:765:35: warning: passing 'unsigned int *' to parameter of type 'int *' converts between pointers to integer types with different sign [-Wpointer-sign] modrm_decode(buf, dest_buf[x], dest_flg[x], ^~~~~~~~~~~ i386.c:324:51: note: passing argument to parameter 'op_flags' here static int modrm_decode(BYTE * b, qword *op, int *op_flags, int reg_type, ^ i386.c:770:35: warning: passing 'unsigned int *' to parameter of type 'int *' converts between pointers to integer types with different sign [-Wpointer-sign] modrm_decode(buf, dest_buf[x], dest_flg[x], ^~~~~~~~~~~ i386.c:324:51: note: passing argument to parameter 'op_flags' here static int modrm_decode(BYTE * b, qword *op, int *op_flags, int reg_type, ^ 23 warnings generated. ar rc libdisasm.a libdis.o i386_invariant.o vm.o bastard.o i386.o ranlib libdisasm.a gcc -Wall -Ilibdisasm/src/arch/i386/libdisasm -g -DVARBITS -I/usr/pkg/include -c hdn_common.c In file included from hdn_common.c:9: In file included from ./hdn_common.h:12: In file included from ./hydan.h:127: ./hdn_subst_insns.h:10:9: warning: '_HDN_INSNS_H_' is used as a header guard here, followed by #define of a different macro [-Wheader-guard] #ifndef _HDN_INSNS_H_ ^~~~~~~~~~~~~ ./hdn_subst_insns.h:11:9: note: '_HSN_INSNS_H_' is defined here; did you mean '_HDN_INSNS_H_'? #define _HSN_INSNS_H_ ^~~~~~~~~~~~~ _HDN_INSNS_H_ hdn_common.c:32:19: warning: assigning to '__uint8_t *' (aka 'unsigned char *') from 'char *' converts between pointers to integer types with different sign [-Wpointer-sign] d.memaddr = hs->data.content + host_curr_pos; ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ hdn_common.c:36:21: warning: passing 'char [1]' to parameter of type 'unsigned char *' converts between pointers to integer types with different sign [-Wpointer-sign] x86_disasm (hs->data.content, ^~~~~~~~~~~~~~~~ libdisasm/src/arch/i386/libdisasm/libdis.h:399:32: note: passing argument to parameter 'buf' here int x86_disasm( unsigned char *buf, unsigned int buf_len, ^ In file included from hdn_common.c:9: In file included from ./hdn_common.h:12: In file included from ./hydan.h:122: ./hdn_exe.h:22:13: warning: inline function 'hdn_exe_section_is_code' is not defined [-Wundefined-inline] inline char hdn_exe_section_is_code (hdn_sections_t *hs); ^ hdn_common.c:28:14: note: used here if (!hdn_exe_section_is_code (hs)) ^ 4 warnings generated. gcc -Wall -Ilibdisasm/src/arch/i386/libdisasm -g -DVARBITS -I/usr/pkg/include -c hdn_embed.c In file included from hdn_embed.c:9: In file included from ./hdn_embed.h:12: In file included from ./hydan.h:127: ./hdn_subst_insns.h:10:9: warning: '_HDN_INSNS_H_' is used as a header guard here, followed by #define of a different macro [-Wheader-guard] #ifndef _HDN_INSNS_H_ ^~~~~~~~~~~~~ ./hdn_subst_insns.h:11:9: note: '_HSN_INSNS_H_' is defined here; did you mean '_HDN_INSNS_H_'? #define _HSN_INSNS_H_ ^~~~~~~~~~~~~ _HDN_INSNS_H_ hdn_embed.c:94:34: warning: passing 'char *' to parameter of type '__uint8_t *' (aka 'unsigned char *') converts between pointers to integer types with different sign [-Wpointer-sign] mesg_data->content + mesg_curr_pos, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ./hdn_subst_insns.h:49:36: note: passing argument to parameter 'source_loc' here uint8_t *source_loc, int bit_offset); ^ hdn_embed.c:148:37: warning: passing 'char *' to parameter of type '__uint8_t *' (aka 'unsigned char *') converts between pointers to integer types with different sign [-Wpointer-sign] hdn_crypto_encrypt (&mesg_data, password); ^~~~~~~~ ./hdn_crypto.h:17:55: note: passing argument to parameter 'key' here void hdn_crypto_encrypt (hdn_data_t **inout, uint8_t *key); ^ hdn_embed.c:161:38: warning: passing 'char [1]' to parameter of type '__uint8_t *' (aka 'unsigned char *') converts between pointers to integer types with different sign [-Wpointer-sign] if (!(sh = hdn_exe_get_sections (host_data->content))) ^~~~~~~~~~~~~~~~~~ ./hdn_exe.h:17:55: note: passing argument to parameter 'file_start' here hdn_sections_header_t *hdn_exe_get_sections (uint8_t *file_start); ^ ./hdn_exe.h:22:13: warning: inline function 'hdn_exe_section_is_code' is not defined [-Wundefined-inline] inline char hdn_exe_section_is_code (hdn_sections_t *hs); ^ hdn_embed.c:171:14: note: used here if (!hdn_exe_section_is_code (tmp_sections)) ^ 5 warnings generated. gcc -Wall -Ilibdisasm/src/arch/i386/libdisasm -g -DVARBITS -I/usr/pkg/include -c hdn_decode.c In file included from hdn_decode.c:9: In file included from ./hdn_decode.h:12: In file included from ./hydan.h:127: ./hdn_subst_insns.h:10:9: warning: '_HDN_INSNS_H_' is used as a header guard here, followed by #define of a different macro [-Wheader-guard] #ifndef _HDN_INSNS_H_ ^~~~~~~~~~~~~ ./hdn_subst_insns.h:11:9: note: '_HSN_INSNS_H_' is defined here; did you mean '_HDN_INSNS_H_'? #define _HSN_INSNS_H_ ^~~~~~~~~~~~~ _HDN_INSNS_H_ hdn_decode.c:88:43: warning: passing 'char *' to parameter of type '__uint8_t *' (aka 'unsigned char *') converts between pointers to integer types with different sign [-Wpointer-sign] hdn_crypto_decrypt (&tmp, key); ^~~ ./hdn_crypto.h:18:55: note: passing argument to parameter 'key' here void hdn_crypto_decrypt (hdn_data_t **inout, uint8_t *key); ^ hdn_decode.c:121:38: warning: passing 'char [1]' to parameter of type '__uint8_t *' (aka 'unsigned char *') converts between pointers to integer types with different sign [-Wpointer-sign] if (!(sh = hdn_exe_get_sections (host_data->content))) ^~~~~~~~~~~~~~~~~~ ./hdn_exe.h:17:55: note: passing argument to parameter 'file_start' here hdn_sections_header_t *hdn_exe_get_sections (uint8_t *file_start); ^ hdn_decode.c:123:63: warning: data argument not used by format string [-Wformat-extra-args] HDN_WARN ("Error extracting sections from host file", ""); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~ ./hdn_io.h:15:50: note: expanded from macro 'HDN_WARN' fprintf (stderr, "%s: " s "\n", __func__, ## args); \ ^ hdn_decode.c:152:37: warning: passing 'char *' to parameter of type '__uint8_t *' (aka 'unsigned char *') converts between pointers to integer types with different sign [-Wpointer-sign] hdn_crypto_decrypt (&mesg_data, password); ^~~~~~~~ ./hdn_crypto.h:18:55: note: passing argument to parameter 'key' here void hdn_crypto_decrypt (hdn_data_t **inout, uint8_t *key); ^ hdn_decode.c:113:9: warning: variable 'sh' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized] if (!host_data) ^~~~~~~~~~ hdn_decode.c:166:12: note: uninitialized use occurs here while (sh && sh->sections) ^~ hdn_decode.c:113:5: note: remove the 'if' if its condition is always false if (!host_data) ^~~~~~~~~~~~~~~ hdn_decode.c:103:30: note: initialize the variable 'sh' to silence this warning hdn_sections_header_t *sh; ^ = NULL 6 warnings generated. gcc -Wall -Ilibdisasm/src/arch/i386/libdisasm -g -DVARBITS -I/usr/pkg/include -c hdn_stats.c In file included from hdn_stats.c:9: In file included from ./hdn_stats.h:12: In file included from ./hydan.h:127: ./hdn_subst_insns.h:10:9: warning: '_HDN_INSNS_H_' is used as a header guard here, followed by #define of a different macro [-Wheader-guard] #ifndef _HDN_INSNS_H_ ^~~~~~~~~~~~~ ./hdn_subst_insns.h:11:9: note: '_HSN_INSNS_H_' is defined here; did you mean '_HDN_INSNS_H_'? #define _HSN_INSNS_H_ ^~~~~~~~~~~~~ _HDN_INSNS_H_ hdn_stats.c:22:19: warning: assigning to '__uint8_t *' (aka 'unsigned char *') from 'char *' converts between pointers to integer types with different sign [-Wpointer-sign] d.memaddr = data->content + curr_pos; ^ ~~~~~~~~~~~~~~~~~~~~~~~~ hdn_stats.c:24:21: warning: passing 'char [1]' to parameter of type 'unsigned char *' converts between pointers to integer types with different sign [-Wpointer-sign] x86_disasm (data->content, data->sz, 0, curr_pos, &d.insn); ^~~~~~~~~~~~~ libdisasm/src/arch/i386/libdisasm/libdis.h:399:32: note: passing argument to parameter 'buf' here int x86_disasm( unsigned char *buf, unsigned int buf_len, ^ hdn_stats.c:100:38: warning: passing 'char [1]' to parameter of type '__uint8_t *' (aka 'unsigned char *') converts between pointers to integer types with different sign [-Wpointer-sign] if (!(sh = hdn_exe_get_sections (host_data->content))) ^~~~~~~~~~~~~~~~~~ ./hdn_exe.h:17:55: note: passing argument to parameter 'file_start' here hdn_sections_header_t *hdn_exe_get_sections (uint8_t *file_start); ^ hdn_stats.c:102:68: warning: data argument not used by format string [-Wformat-extra-args] HDN_WARN ("Error extracting .text segment from host file", ""); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~ ./hdn_io.h:15:50: note: expanded from macro 'HDN_WARN' fprintf (stderr, "%s: " s "\n", __func__, ## args); \ ^ hdn_stats.c:122:25: warning: passing 'char [1]' to parameter of type 'unsigned char *' converts between pointers to integer types with different sign [-Wpointer-sign] x86_disasm (tmp_sections->data.content, ^~~~~~~~~~~~~~~~~~~~~~~~~~ libdisasm/src/arch/i386/libdisasm/libdis.h:399:32: note: passing argument to parameter 'buf' here int x86_disasm( unsigned char *buf, unsigned int buf_len, ^ hdn_stats.c:249:21: warning: assigning to '__uint8_t *' (aka 'unsigned char *') from 'char *' converts between pointers to integer types with different sign [-Wpointer-sign] dis.memaddr = data->content + curr_pos; ^ ~~~~~~~~~~~~~~~~~~~~~~~~ hdn_stats.c:251:21: warning: passing 'char [1]' to parameter of type 'unsigned char *' converts between pointers to integer types with different sign [-Wpointer-sign] x86_disasm (data->content, data->sz, 0, curr_pos, &dis.insn); ^~~~~~~~~~~~~ libdisasm/src/arch/i386/libdisasm/libdis.h:399:32: note: passing argument to parameter 'buf' here int x86_disasm( unsigned char *buf, unsigned int buf_len, ^ hdn_stats.c:328:42: warning: passing 'char [1]' to parameter of type '__uint8_t *' (aka 'unsigned char *') converts between pointers to integer types with different sign [-Wpointer-sign] if (!(sh = hdn_exe_get_sections (host_data->content))) ^~~~~~~~~~~~~~~~~~ ./hdn_exe.h:17:55: note: passing argument to parameter 'file_start' here hdn_sections_header_t *hdn_exe_get_sections (uint8_t *file_start); ^ hdn_stats.c:330:72: warning: data argument not used by format string [-Wformat-extra-args] HDN_WARN ("Error extracting .text segment from host file", ""); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~ ./hdn_io.h:15:50: note: expanded from macro 'HDN_WARN' fprintf (stderr, "%s: " s "\n", __func__, ## args); \ ^ In file included from hdn_stats.c:9: In file included from ./hdn_stats.h:12: In file included from ./hydan.h:122: ./hdn_exe.h:22:13: warning: inline function 'hdn_exe_section_is_code' is not defined [-Wundefined-inline] inline char hdn_exe_section_is_code (hdn_sections_t *hs); ^ hdn_stats.c:116:14: note: used here if (!hdn_exe_section_is_code (tmp_sections)) ^ 11 warnings generated. gcc -Wall -Ilibdisasm/src/arch/i386/libdisasm -g -DVARBITS -I/usr/pkg/include -c hdn_crypto.c In file included from hdn_crypto.c:9: In file included from ./hdn_crypto.h:12: In file included from ./hydan.h:127: ./hdn_subst_insns.h:10:9: warning: '_HDN_INSNS_H_' is used as a header guard here, followed by #define of a different macro [-Wheader-guard] #ifndef _HDN_INSNS_H_ ^~~~~~~~~~~~~ ./hdn_subst_insns.h:11:9: note: '_HSN_INSNS_H_' is defined here; did you mean '_HDN_INSNS_H_'? #define _HSN_INSNS_H_ ^~~~~~~~~~~~~ _HDN_INSNS_H_ hdn_crypto.c:39:71: warning: data argument not used by format string [-Wformat-extra-args] HDN_WARN ("Error: Invalid pass. Using default seed instead", ""); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~ ./hdn_io.h:15:50: note: expanded from macro 'HDN_WARN' fprintf (stderr, "%s: " s "\n", __func__, ## args); \ ^ hdn_crypto.c:115:45: warning: passing '__uint8_t *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign] hdn_math_xor (&in->sz, hdn_crypto_hash (key), sizeof (in->sz)); ^~~ hdn_crypto.c:68:33: note: passing argument to parameter 'in' here uint8_t *hdn_crypto_hash (char *in) ^ hdn_crypto.c:120:38: warning: passing '__uint32_t *' (aka 'unsigned int *') to parameter of type 'int *' converts between pointers to integer types with different sign [-Wpointer-sign] EVP_EncryptUpdate (&ctx, cipher, &out_sz, (char *)in, sizeof(in->sz) + sz); ^~~~~~~ /usr/pkgsrc/work/security/hydan/work/.buildlink/include/openssl/evp.h:585:8: note: passing argument to parameter 'outl' here int *outl, const unsigned char *in, int inl); ^ hdn_crypto.c:120:47: warning: passing 'char *' to parameter of type 'const unsigned char *' converts between pointers to integer types with different sign [-Wpointer-sign] EVP_EncryptUpdate (&ctx, cipher, &out_sz, (char *)in, sizeof(in->sz) + sz); ^~~~~~~~~~ /usr/pkgsrc/work/security/hydan/work/.buildlink/include/openssl/evp.h:585:35: note: passing argument to parameter 'in' here int *outl, const unsigned char *in, int inl); ^ hdn_crypto.c:123:48: warning: passing '__uint32_t *' (aka 'unsigned int *') to parameter of type 'int *' converts between pointers to integer types with different sign [-Wpointer-sign] EVP_EncryptFinal (&ctx, cipher + total_sz, &out_sz); ^~~~~~~ /usr/pkgsrc/work/security/hydan/work/.buildlink/include/openssl/evp.h:587:68: note: passing argument to parameter 'outl' here int EVP_EncryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl); ^ hdn_crypto.c:165:37: warning: passing '__uint32_t *' (aka 'unsigned int *') to parameter of type 'int *' converts between pointers to integer types with different sign [-Wpointer-sign] EVP_DecryptUpdate (&ctx, plain, &out_sz, in->content, in->sz); ^~~~~~~ /usr/pkgsrc/work/security/hydan/work/.buildlink/include/openssl/evp.h:594:8: note: passing argument to parameter 'outl' here int *outl, const unsigned char *in, int inl); ^ hdn_crypto.c:165:46: warning: passing 'char [1]' to parameter of type 'const unsigned char *' converts between pointers to integer types with different sign [-Wpointer-sign] EVP_DecryptUpdate (&ctx, plain, &out_sz, in->content, in->sz); ^~~~~~~~~~~ /usr/pkgsrc/work/security/hydan/work/.buildlink/include/openssl/evp.h:594:35: note: passing argument to parameter 'in' here int *outl, const unsigned char *in, int inl); ^ hdn_crypto.c:166:45: warning: passing '__uint32_t *' (aka 'unsigned int *') to parameter of type 'int *' converts between pointers to integer types with different sign [-Wpointer-sign] EVP_DecryptFinal (&ctx, plain + out_sz, &out_sz); ^~~~~~~ /usr/pkgsrc/work/security/hydan/work/.buildlink/include/openssl/evp.h:595:69: note: passing argument to parameter 'outl' here int EVP_DecryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *outm, int *outl); ^ hdn_crypto.c:172:45: warning: passing '__uint8_t *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign] hdn_math_xor (&in->sz, hdn_crypto_hash (key), sizeof (in->sz)); ^~~ hdn_crypto.c:68:33: note: passing argument to parameter 'in' here uint8_t *hdn_crypto_hash (char *in) ^ 10 warnings generated. gcc -Wall -Ilibdisasm/src/arch/i386/libdisasm -g -DVARBITS -I/usr/pkg/include -c hdn_subst_insns.c hdn_subst_insns.c:924:42: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare] _get_imm_val(insn, host) < 0) ~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~ hdn_subst_insns.c:550:13: warning: unused function '_address_add_visited' [-Wunused-function] static char _address_add_visited (struct address_array *addr_arr, ^ hdn_subst_insns.c:572:17: warning: unused function '_find_addr' [-Wunused-function] static uint32_t _find_addr (hdn_disassembly_data_t *dis_array, ^ 3 warnings generated. gcc -Wall -Ilibdisasm/src/arch/i386/libdisasm -g -DVARBITS -I/usr/pkg/include -c hdn_io.c In file included from hdn_io.c:9: In file included from ./hdn_io.h:12: In file included from ./hydan.h:127: ./hdn_subst_insns.h:10:9: warning: '_HDN_INSNS_H_' is used as a header guard here, followed by #define of a different macro [-Wheader-guard] #ifndef _HDN_INSNS_H_ ^~~~~~~~~~~~~ ./hdn_subst_insns.h:11:9: note: '_HSN_INSNS_H_' is defined here; did you mean '_HDN_INSNS_H_'? #define _HSN_INSNS_H_ ^~~~~~~~~~~~~ _HDN_INSNS_H_ 1 warning generated. gcc -Wall -Ilibdisasm/src/arch/i386/libdisasm -g -DVARBITS -I/usr/pkg/include -c hdn_math.c In file included from hdn_math.c:9: In file included from ./hdn_math.h:12: In file included from ./hydan.h:127: ./hdn_subst_insns.h:10:9: warning: '_HDN_INSNS_H_' is used as a header guard here, followed by #define of a different macro [-Wheader-guard] #ifndef _HDN_INSNS_H_ ^~~~~~~~~~~~~ ./hdn_subst_insns.h:11:9: note: '_HSN_INSNS_H_' is defined here; did you mean '_HDN_INSNS_H_'? #define _HSN_INSNS_H_ ^~~~~~~~~~~~~ _HDN_INSNS_H_ 1 warning generated. gcc -Wall -Ilibdisasm/src/arch/i386/libdisasm -g -DVARBITS -I/usr/pkg/include -c hdn_exe.c In file included from hdn_exe.c:9: In file included from ./hdn_exe.h:12: In file included from ./hydan.h:127: ./hdn_subst_insns.h:10:9: warning: '_HDN_INSNS_H_' is used as a header guard here, followed by #define of a different macro [-Wheader-guard] #ifndef _HDN_INSNS_H_ ^~~~~~~~~~~~~ ./hdn_subst_insns.h:11:9: note: '_HSN_INSNS_H_' is defined here; did you mean '_HDN_INSNS_H_'? #define _HSN_INSNS_H_ ^~~~~~~~~~~~~ _HDN_INSNS_H_ hdn_exe.c:69:53: warning: data argument not used by format string [-Wformat-extra-args] HDN_WARN ("Host file is not in ELF format", ""); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~ ./hdn_io.h:15:50: note: expanded from macro 'HDN_WARN' fprintf (stderr, "%s: " s "\n", __func__, ## args); \ ^ hdn_exe.c:77:59: warning: data argument not used by format string [-Wformat-extra-args] HDN_WARN ("Host file is not in elf32 lsb format", ""); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~ ./hdn_io.h:15:50: note: expanded from macro 'HDN_WARN' fprintf (stderr, "%s: " s "\n", __func__, ## args); \ ^ hdn_exe.c:84:53: warning: data argument not used by format string [-Wformat-extra-args] HDN_WARN ("Host file is not an executable", ""); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~ ./hdn_io.h:15:50: note: expanded from macro 'HDN_WARN' fprintf (stderr, "%s: " s "\n", __func__, ## args); \ ^ hdn_exe.c:90:58: warning: data argument not used by format string [-Wformat-extra-args] HDN_WARN ("Host file has no ELF program header", ""); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~ ./hdn_io.h:15:50: note: expanded from macro 'HDN_WARN' fprintf (stderr, "%s: " s "\n", __func__, ## args); \ ^ hdn_exe.c:96:58: warning: data argument not used by format string [-Wformat-extra-args] HDN_WARN ("Host file has no ELF section header", ""); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~ ./hdn_io.h:15:50: note: expanded from macro 'HDN_WARN' fprintf (stderr, "%s: " s "\n", __func__, ## args); \ ^ hdn_exe.c:102:65: warning: data argument not used by format string [-Wformat-extra-args] HDN_WARN ("Host file has no section name string table", ""); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~ ./hdn_io.h:15:50: note: expanded from macro 'HDN_WARN' fprintf (stderr, "%s: " s "\n", __func__, ## args); \ ^ 7 warnings generated. gcc -Wall -Ilibdisasm/src/arch/i386/libdisasm -g -DVARBITS -I/usr/pkg/include -c hydan.c In file included from hydan.c:9: In file included from ./hydan.h:127: ./hdn_subst_insns.h:10:9: warning: '_HDN_INSNS_H_' is used as a header guard here, followed by #define of a different macro [-Wheader-guard] #ifndef _HDN_INSNS_H_ ^~~~~~~~~~~~~ ./hdn_subst_insns.h:11:9: note: '_HSN_INSNS_H_' is defined here; did you mean '_HDN_INSNS_H_'? #define _HSN_INSNS_H_ ^~~~~~~~~~~~~ _HDN_INSNS_H_ 1 warning generated. gcc -Wall -Ilibdisasm/src/arch/i386/libdisasm -g -DVARBITS -o hydan hdn_common.o hdn_embed.o hdn_decode.o hdn_stats.o hdn_crypto.o hdn_subst_insns.o hdn_io.o hdn_math.o hdn_exe.o hydan.o -Llibdisasm/src/arch/i386/libdisasm -ldisasm -lcrypto -lm hdn_common.o: In function `hdn_disassemble_all': /usr/pkgsrc/work/security/hydan/work/hydan/hdn_common.c:28: undefined reference to `hdn_exe_section_is_code' hdn_embed.o: In function `hdn_embed_main': /usr/pkgsrc/work/security/hydan/work/hydan/hdn_embed.c:171: undefined reference to `hdn_exe_section_is_code' hdn_stats.o: In function `hdn_stats_main': /usr/pkgsrc/work/security/hydan/work/hydan/hdn_stats.c:341: undefined reference to `hdn_exe_section_is_code' hdn_stats.o: In function `_count_fns': /usr/pkgsrc/work/security/hydan/work/hydan/hdn_stats.c:116: undefined reference to `hdn_exe_section_is_code' clang: error: linker command failed with exit code 1 (use -v to see invocation) *** Error code 1 Stop. bmake: stopped in /usr/pkgsrc/work/security/hydan/work/hydan *** Error code 1 Stop. bmake: stopped in /usr/pkgsrc/security/hydan *** Error code 1 Stop. bmake: stopped in /usr/pkgsrc/security/hydan