Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Fixed compile error: memcpy not defined#89

Merged
nkallen merged 3 commits intonodegit:masternodegit/nodegit:masterfrom
FrozenCow:fix_compileFrozenCow/nodegit:fix_compileCopy head branch name to clipboard
Sep 8, 2013
Merged

Fixed compile error: memcpy not defined#89
nkallen merged 3 commits intonodegit:masternodegit/nodegit:masterfrom
FrozenCow:fix_compileFrozenCow/nodegit:fix_compileCopy head branch name to clipboard

Conversation

@FrozenCow
Copy link
Contributor

Could not compile on ArchLinux (with gcc 4.8.1) and Ubuntu. 9365962 change should fix that.

Additionally fixed a few of the compiler warnings that showed up. I'm not entirely sure you like how I fixed those, but give v0.18.0.json and the .ejs files a look.

Also, I think 6ca5347 is not only a fix for the warning, but it seemed actually an error (that would happen at runtime). The functions are unused at the moment, so for now I just focused on fixing the warning.

There are still 2 compiler warnings left:

I introduced this one, but I couldn't figure out a nice way to fix this with the templates. However a unused variable is less severe than a type-cast warning.

../src/index.cc: In static member function ‘static v8::Handle<v8::Value> GitIndex::Find(const v8::Arguments&)’:
../src/index.cc:693:7: warning: unused variable ‘result’ [-Wunused-variable]
   int result = git_index_find(
       ^

Next there is still this warning, which also has to do with a parameter that should be marked as "isReturn". When I did that other things broke and couldn't figure out how to fix this properly.

../src/submodule.cc: In static member function ‘static v8::Handle<v8::Value> GitSubmodule::Status(const v8::Arguments&)’:
../src/submodule.cc:697:70: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
             from_status = (unsigned int *) args[0]->ToInt32()->Value();
                                                                      ^

I have to say that I like how simple most of the templating is btw. It's good to see a bunch of warnings being resolved by one change in the templates too.

@tbranyen tbranyen mentioned this pull request Sep 8, 2013
nkallen added a commit that referenced this pull request Sep 8, 2013
Fixed compile error: memcpy not defined
@nkallen nkallen merged commit a677cec into nodegit:master Sep 8, 2013
@FrozenCow FrozenCow deleted the fix_compile branch September 8, 2013 18:15
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.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.