aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ChangeLog9
-rw-r--r--src/boot/strap/translator.clisp6
-rw-r--r--src/boot/translator.boot4
-rw-r--r--src/lib/cfuns-c.c6
-rw-r--r--src/lib/sockio-c.c2
-rw-r--r--src/utils/command.cc4
6 files changed, 20 insertions, 11 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 52cef853..0304bd1a 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,12 @@
+2012-08-18 Gabriel Dos Reis <gdr@cs.tamu.edu>
+
+ * boot/translator.boot (shoeOutParse): Fix thinko.
+ * lib/cfuns-c.c (oa_getcwd): Tidy.
+ (oa_spawn): Likewise.
+ * lib/sockio-c.c (send_string_len): Likewise.
+ * utils/command.cc (option_value): Likewise.
+ (execute_core): Likewise.
+
2012-07-25 Aleksej Saushev <asau@inbox.ru>
* hyper/htadd.c: Include <string.h>
diff --git a/src/boot/strap/translator.clisp b/src/boot/strap/translator.clisp
index 50553932..11759bc9 100644
--- a/src/boot/strap/translator.clisp
+++ b/src/boot/strap/translator.clisp
@@ -448,9 +448,9 @@
(T (THROW :OPEN-AXIOM-CATCH-POINT #1#))))
(T #1#))))
(COND ((EQ |found| 'TRAPPED) NIL)
- ((NOT (|bStreamNull| (|parserTokens| |ps|))) (|bpGeneralErrorHere|)
- NIL)
- ((NULL (|parserTrees| |ps|)) (|bpGeneralErrorHere|) NIL)
+ ((NOT (|bStreamNull| (|parserTokens| |ps|)))
+ (|bpGeneralErrorHere| |ps|) NIL)
+ ((NULL (|parserTrees| |ps|)) (|bpGeneralErrorHere| |ps|) NIL)
(T (CAR (|parserTrees| |ps|)))))))
(DEFUN |genDeclaration| (|n| |t|)
diff --git a/src/boot/translator.boot b/src/boot/translator.boot
index 5f296b6a..7f347cdc 100644
--- a/src/boot/translator.boot
+++ b/src/boot/translator.boot
@@ -362,10 +362,10 @@ shoeOutParse toks ==
catch(e: BootParserException) => e
found = 'TRAPPED => nil
not bStreamNull parserTokens ps =>
- bpGeneralErrorHere()
+ bpGeneralErrorHere ps
nil
parserTrees ps = nil =>
- bpGeneralErrorHere()
+ bpGeneralErrorHere ps
nil
first parserTrees ps
diff --git a/src/lib/cfuns-c.c b/src/lib/cfuns-c.c
index ca582164..049d7305 100644
--- a/src/lib/cfuns-c.c
+++ b/src/lib/cfuns-c.c
@@ -611,10 +611,10 @@ oa_setenv(const char* var, const char* val)
OPENAXIOM_C_EXPORT char*
oa_getcwd(void)
{
- int bufsz = 256;
+ size_t bufsz = 256;
char* buf = (char*) malloc(bufsz);
#ifdef __WIN32__
- int n = GetCurrentDirectory(bufsz, buf);
+ DWORD n = GetCurrentDirectory(bufsz, buf);
if (n == 0) {
perror("oa_getcwd");
exit(-1);
@@ -800,7 +800,7 @@ oa_spawn(Process* proc, SpawnFlags flags)
/* lpCurrentDirectory */ NULL,
/* lpstartupInfo */ &startup_info,
/* lpProcessInformation */ &proc_info) == 0) {
- fprintf(stderr, "oa_spawn: error %d\n", GetLastError());
+ fprintf(stderr, "oa_spawn: error %lu\n", GetLastError());
return proc->id = -1;
}
proc->id = proc_info.dwProcessId;
diff --git a/src/lib/sockio-c.c b/src/lib/sockio-c.c
index a29be625..a7efa4e2 100644
--- a/src/lib/sockio-c.c
+++ b/src/lib/sockio-c.c
@@ -663,7 +663,7 @@ send_string_len(openaxiom_sio *sock, const char *str,int len)
val = swrite(sock, (const Byte*) buf, len+1, "send_string_len");
}
if (val == -1) {
- return -1;
+ return val;
}
return 0;
}
diff --git a/src/utils/command.cc b/src/utils/command.cc
index cd9017c3..6821a3e0 100644
--- a/src/utils/command.cc
+++ b/src/utils/command.cc
@@ -113,7 +113,7 @@ namespace OpenAxiom {
const char*
option_value(const Command* command, const char* opt) {
- const int n = strlen(opt);
+ const size_t n = strlen(opt);
for (int i = 1; i < command->core.argc; ++i) {
const char* arg = command->core.argv[i];
if (strlen(arg) < n)
@@ -506,7 +506,7 @@ execute_core(const Command* command, Driver driver)
/* lpCurrentDirectory */ NULL,
/* lpstartupInfo */ &startupInfo,
/* lpProcessInformation */ &procInfo) == 0) {
- fprintf(stderr, "error %d\n", GetLastError());
+ fprintf(stderr, "error %lu\n", GetLastError());
abort();
}
WaitForSingleObject(procInfo.hProcess, INFINITE);