Skip to content
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

Merged
merged 1 commit into from Mar 6, 2019
Merged

Little code cleanups #13277

merged 1 commit into from Mar 6, 2019

Conversation

devnexen
Copy link
Contributor

@devnexen devnexen commented Mar 5, 2019

No description provided.

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));
Copy link
Contributor

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*?

Copy link
Contributor Author

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.

Copy link
Collaborator

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}))
Copy link
Collaborator

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

Copy link
Contributor Author

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....

Copy link
Collaborator

@radare radare left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.

@codecov-io
Copy link

Codecov Report

Merging #13277 into master will decrease coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            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
Impacted Files Coverage Δ
libr/bin/format/objc/mach0_classes.c 76.21% <ø> (-0.04%) ⬇️
libr/anal/anal.c 74.49% <ø> (ø) ⬆️
libr/anal/fcn.c 81.65% <100%> (ø) ⬆️
libr/core/cmd_anal.c 51.29% <0%> (-0.22%) ⬇️
libr/core/project.c 57.51% <0%> (+0.34%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 81ad0fe...c7009fe. Read the comment docs.

@radare radare merged commit 3f2bff9 into radareorg:master Mar 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants