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

Fix build errors and warnings #21

Open
GoogleCodeExporter opened this issue Nov 2, 2015 · 0 comments
Open

Fix build errors and warnings #21

GoogleCodeExporter opened this issue Nov 2, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. make

What is the expected output? What do you see instead?

clean build

What version of the product are you using? On what operating system?
OSX Yosemite, Apple LLVM version 6.0 (clang-600.0.51) (based on LLVM 3.5svn)

Please provide any additional information below.
Following patch fixes build error (due to malloc.h and warnings due to unused 
variables)


Index: compute-accuracy.c
===================================================================
--- compute-accuracy.c  (revision 41)
+++ compute-accuracy.c  (working copy)
@@ -26,7 +26,7 @@
 int main(int argc, char **argv)
 {
   FILE *f;
-  char st1[max_size], st2[max_size], st3[max_size], st4[max_size], 
bestw[N][max_size], file_name[max_size], ch;
+  char st1[max_size], st2[max_size], st3[max_size], st4[max_size], 
bestw[N][max_size], file_name[max_size];
   float dist, len, bestd[N], vec[max_size];
   long long words, size, a, b, c, d, b1, b2, b3, threshold = 0;
   float *M;
Index: distance.c
===================================================================
--- distance.c  (revision 41)
+++ distance.c  (working copy)
@@ -28,7 +28,6 @@
   char file_name[max_size], st[100][max_size];
   float dist, len, bestd[N], vec[max_size];
   long long words, size, a, b, c, d, cn, bi[100];
-  char ch;
   float *M;
   char *vocab;
   if (argc < 2) {
Index: makefile
===================================================================
--- makefile    (revision 41)
+++ makefile    (working copy)
@@ -1,6 +1,6 @@
 CC = gcc
 #Using -Ofast instead of -O3 might result in faster code, but is supported only by newer GCC versions
-CFLAGS = -lm -pthread -O3 -march=native -Wall -funroll-loops -Wno-unused-result
+CFLAGS = -I. -lm -pthread -O3 -march=native -Wall -funroll-loops 
-Wno-unused-result

 all: word2vec word2phrase distance word-analogy compute-accuracy

@@ -17,4 +17,4 @@
    chmod +x *.sh

 clean:
-   rm -rf word2vec word2phrase distance word-analogy compute-accuracy
\ No newline at end of file
+   rm -rf word2vec word2phrase distance word-analogy compute-accuracy
Index: word-analogy.c
===================================================================
--- word-analogy.c  (revision 41)
+++ word-analogy.c  (working copy)
@@ -28,7 +28,6 @@
   char file_name[max_size], st[100][max_size];
   float dist, len, bestd[N], vec[max_size];
   long long words, size, a, b, c, d, cn, bi[100];
-  char ch;
   float *M;
   char *vocab;
   if (argc < 2) {

Original issue reported on code.google.com by [email protected] on 1 Oct 2014 at 5:50

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant