New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Little code cleanups #13277
Little code cleanups #13277
Conversation
libr/anal/fcn.c
Outdated
@@ -1133,7 +1133,7 @@ static int fcn_recurse(RAnal *anal, RAnalFunction *fcn, ut64 addr, ut8 *buf, ut6 | |||
// if first byte in op.ptr is 0xff, then set leaddr assuming its a jumptable | |||
{ | |||
ut8 buf[4]; | |||
anal->iob.read_at (anal->iob.io, op.ptr, &buf, sizeof (buf)); | |||
anal->iob.read_at (anal->iob.io, op.ptr, (ut8 *)&buf, sizeof (buf)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
buf
is defined as an array of ut8
literally in the line above, what's the added value of explicitly casting &buf
to ut8*
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nothing :-) it s here to silent compilation warning with pedantic modern compiler.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just pass buf without the & and the cast shouoldnt be necessary i think this patch is also in my kill-maxbb PR
mk/platform.mk
Outdated
@@ -1,6 +1,10 @@ | |||
ifeq ($(OSTYPE),auto) | |||
OSTYPE=$(shell uname | tr 'A-Z' 'a-z') | |||
endif | |||
ifneq (,$(findstring darwin,${OSTYPE})) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use ifneq($(OSTYPE),darwin)
.. but why? i think this will break on BSDs. and this sounds more like a linuxism
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm in fact this change was accidental....
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.
Codecov Report
@@ Coverage Diff @@
## master #13277 +/- ##
==========================================
- Coverage 36.57% 36.57% -0.01%
==========================================
Files 916 916
Lines 296318 296317 -1
==========================================
- Hits 108382 108371 -11
- Misses 187936 187946 +10
Continue to review full report at Codecov.
|
No description provided.