mirror of
https://github.com/radareorg/radare2.git
synced 2024-11-23 21:29:49 +00:00
Fix some warns and enhace GIT_TAP in makefiles
This commit is contained in:
parent
c27838a59c
commit
9850c0a3c3
@ -5,7 +5,7 @@ BINDEPS+=r_sign r_lang r_asm r_syscall r_db r_hash
|
||||
BINDEPS+=r_magic r_socket r_flags r_util r_egg r_crypto
|
||||
|
||||
include ../rules.mk
|
||||
CFLAGS+=-DGIT_TAP=\"$(shell git describe --tags)\"
|
||||
CFLAGS+=-DGIT_TAP=\"$(GIT_TAP)\"
|
||||
|
||||
sign:
|
||||
ldid -Sradare2.xml radare2
|
||||
|
@ -53,8 +53,8 @@ USE_LIB_MAGIC=@USE_LIB_MAGIC@
|
||||
SSL_CFLAGS=@SSL_CFLAGS@
|
||||
SSL_LDFLAGS=@SSL_LDFLAGS@
|
||||
|
||||
GIT_TIP=$(shell git log HEAD^..HEAD|head -n1|cut -d ' ' -f2)
|
||||
GIT_TAP=$(shell git describe --tags)
|
||||
GIT_TIP=$(shell (git log HEAD^..HEAD 2>&1 || echo HEAD) |head -n1|cut -d ' ' -f2)
|
||||
GIT_TAP=$(shell (git describe --tags 2>/dev/null || echo ${VERSION} ))
|
||||
|
||||
# cache compiler flags at configure time #
|
||||
CFLAGS+=@CFLAGS@
|
||||
|
@ -150,3 +150,4 @@ Use 'ec' to choose the colors for your disassembly palette
|
||||
Here be dragons
|
||||
Trust no one, either a zero. Both lie.
|
||||
EIP = 0x41414141
|
||||
/dev/brain: No such file or directory
|
||||
|
@ -40,7 +40,7 @@ static inline int is_valid_char (unsigned char ch) {
|
||||
#endif
|
||||
|
||||
static int inithist() {
|
||||
ZERO_FILL (&I.history);
|
||||
ZERO_FILL (I.history);
|
||||
I.history.data = (char **)malloc ((I.history.size+1024)*sizeof(char *));
|
||||
if (I.history.data==NULL)
|
||||
return R_FALSE;
|
||||
@ -51,7 +51,7 @@ static int inithist() {
|
||||
|
||||
/* initialize history stuff */
|
||||
R_API int r_line_dietline_init() {
|
||||
ZERO_FILL (&I.completion);
|
||||
ZERO_FILL (I.completion);
|
||||
if (!inithist ())
|
||||
return R_FALSE;
|
||||
I.echo = R_TRUE;
|
||||
|
@ -670,7 +670,7 @@ toro:
|
||||
}
|
||||
if (show_flags) {
|
||||
flag = r_flag_get_i (core->flags, at);
|
||||
if (flag && (!f || (f && strcmp (f->name, flag)))) {
|
||||
if (flag && (!f || (f && strcmp (f->name, flag->name)))) {
|
||||
if (show_lines && refline) {
|
||||
if (show_color) {
|
||||
r_cons_strcat (color_flow);
|
||||
|
@ -121,7 +121,7 @@ typedef void (*PrintfCallback)(const char *str, ...);
|
||||
#endif
|
||||
|
||||
#define BITS2BYTES(x) ((x/8)+((x%8)?1:0))
|
||||
#define ZERO_FILL(x) memset (x, 0, sizeof (x))
|
||||
#define ZERO_FILL(x) memset (&x, 0, sizeof (x))
|
||||
#define R_NEWS0(x,y) (x*)memset (malloc(sizeof(x)*y), 0, sizeof(x)*y);
|
||||
#define R_NEWS(x,y) (x*)malloc(sizeof(x)*y)
|
||||
#define R_NEW(x) (x*)malloc(sizeof(x))
|
||||
@ -133,10 +133,10 @@ typedef void (*PrintfCallback)(const char *str, ...);
|
||||
#define R_MEM_ALIGN(x) ((void *)(size_t)(((ut64)(size_t)x) & 0xfffffffffffff000LL))
|
||||
|
||||
#define R_PTR_ALIGN(v,t) \
|
||||
((char *)(((ut64)(v) ) \
|
||||
((char *)(((size_t)(v) ) \
|
||||
& ~(t - 1)))
|
||||
#define R_PTR_ALIGN_NEXT(v,t) \
|
||||
((char *)(((ut64)(v) + (t - 1)) \
|
||||
((char *)(((size_t)(v) + (t - 1)) \
|
||||
& ~(t - 1)))
|
||||
|
||||
#define R_BIT_SET(x,y) (x[y>>4] |= (1<<(y&0xf)))
|
||||
|
@ -342,7 +342,7 @@ R_API int r_io_write(struct r_io_t *io, const ut8 *buf, int len) {
|
||||
}
|
||||
|
||||
R_API int r_io_write_at(RIO *io, ut64 addr, const ut8 *buf, int len) {
|
||||
if (r_io_seek (io, addr, R_IO_SEEK_SET)<0)
|
||||
if (r_io_seek (io, addr, R_IO_SEEK_SET) == UT64_MAX)
|
||||
return -1;
|
||||
return r_io_write (io, buf, len);
|
||||
}
|
||||
|
@ -33,10 +33,11 @@ static void haret_wait_until_prompt(RSocket *s) {
|
||||
}
|
||||
}
|
||||
|
||||
static int haret__read(struct r_io_t *io, RIODesc *fd, ut8 *buf, int count) {
|
||||
static int haret__read(RIO *io, RIODesc *fd, ut8 *buf, int count) {
|
||||
char tmp[1024];
|
||||
int i = 0;
|
||||
ut64 off, j;
|
||||
ut64 off;
|
||||
st64 j;
|
||||
RSocket *s = HARET_FD (fd);
|
||||
|
||||
off = io->off & -4;
|
||||
@ -55,7 +56,7 @@ static int haret__read(struct r_io_t *io, RIODesc *fd, ut8 *buf, int count) {
|
||||
tmp[(io->off - off)*2] = 0;
|
||||
i += r_hex_str2bin (tmp+j, buf+i);
|
||||
}
|
||||
j=0;
|
||||
j = 0;
|
||||
}
|
||||
haret_wait_until_prompt (s);
|
||||
return i;
|
||||
|
@ -35,7 +35,7 @@
|
||||
#define FLDSIZE_X (FLDBASE * 2 + 1)
|
||||
|
||||
//static char * key_fingerprint_randomart(ut8 *dgst_raw, ut32 dgst_raw_len) {
|
||||
R_API char * r_print_randomart(const ut8 *dgst_raw, ut32 dgst_raw_len, ut64 addr) {
|
||||
R_API char *r_print_randomart(const ut8 *dgst_raw, ut32 dgst_raw_len, ut64 addr) {
|
||||
/*
|
||||
* Chars to be used after each other every time the worm
|
||||
* intersects with itself. Matter of taste.
|
||||
|
Loading…
Reference in New Issue
Block a user