FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Fixed compile error: memcpy not defined by FrozenCow · Pull Request #89 · nodegit/nodegit · GitHub

Repository navigation

Fixed compile error: memcpy not defined - #89

Merged
nkallen merged 3 commits into
nodegit:masterfrom
FrozenCow:fix_compile
Sep 8, 2013
Merged

nkallen merged 3 commits into
nodegit:masterfrom
FrozenCow:fix_compile

Conversation

Copy link
Copy Markdown
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 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 merged commit a677cec into nodegit:master Sep 8, 2013
FrozenCow deleted the fix_compile branch September 8, 2013 18:15
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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


Back | FazBrowse Home | New Git URL