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

Unnecessary conversion from char* to char* #6389

Closed
csukuangfj opened this issue May 8, 2018 · 0 comments · Fixed by #6390
Closed

Unnecessary conversion from char* to char* #6389

csukuangfj opened this issue May 8, 2018 · 0 comments · Fixed by #6390

Comments

@csukuangfj
Copy link
Contributor

Code Status

  • branch: master

Description

See the code

char* recovered_value = new char[10];
caffe_gpu_memcpy(10, gpu_data, recovered_value);
for (int i = 0; i < mem.size(); ++i) {
EXPECT_EQ((static_cast<char*>(recovered_value))[i], 1);
}

recovered_value is casted from char* to char*.

csukuangfj added a commit to open-cv/caffe that referenced this issue May 8, 2018
shelhamer added a commit that referenced this issue Jun 6, 2018
drop unnecessary cast

fix issue #6389
sjb7749 pushed a commit to sjb7749/caffe that referenced this issue Jul 2, 2018
sjb7749 pushed a commit to sjb7749/caffe that referenced this issue Jul 2, 2018
XinYao1994 pushed a commit to XinYao1994/caffe that referenced this issue Aug 29, 2018
XinYao1994 pushed a commit to XinYao1994/caffe that referenced this issue Aug 29, 2018
beniz pushed a commit to jolibrain/caffe that referenced this issue Sep 24, 2018
jkelling pushed a commit to jkelling/caffe that referenced this issue Jul 12, 2021
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 a pull request may close this issue.

1 participant