Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Support
    • Submit feedback
    • Contribute to GitLab
  • Sign in
W
word2vec
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 35
    • Issues 35
    • List
    • Boards
    • Labels
    • Milestones
  • Merge Requests 0
    • Merge Requests 0
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • DESHPANDE SRIJAY PARAG
  • word2vec
  • Issues
  • #21

Closed
Open
Opened Mar 21, 2016 by DESHPANDE SRIJAY PARAG@srijayd
  • Report abuse
  • New issue
Report abuse New issue

Fix build errors and warnings

Created by: GoogleCodeExporter

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 nitingupta910@gmail.com on 1 Oct 2014 at 5:50

Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
0
Labels
None
Assign labels
  • View project labels
Reference: srijayd/word2vec#21