on master help sign in
Remove C warnings when compiling with a proper compiler
commitdce3569681698ca70edfa306e39dc94a1b1c1025 authorAhmad Salim Al-Sibahi <asal@itu.dk> dateTue 19 Nov 2013, 17:11 (13 years ago) parent76a3fda
3 files changed+6−7
rts/idris_opts.c+3−4 rts/idris_rts.c+2−2 rts/idris_rts.h+1−1
rts/idris_opts.c+3−4
@@ -6,18 +6,17 @@
66#include <string.h>
77
88
9−char usage[] =
10− "\n" \
9+#define USAGE "\n" \
1110 "Usage: <prog> [+RTS <rtsopts> -RTS] <args>\n\n" \
1211 "Options:\n\n" \
1312 " -? Print this message and exits.\n" \
1413 " -s Summary GC statistics.\n" \
1514 " -H Initial heap size. Egs: -H4M, -H500K, -H1G\n" \
1615 " -K Sets the maximum stack size. Egs: -K8M\n" \
17− "\n";
16+ "\n"
1817
1918void print_usage(FILE * s) {
20− fprintf(s, usage);
19+ fprintf(s, USAGE);
2120}
2221
2322int read_size(char * str) {
rts/idris_rts.c+2−2
@@ -161,7 +161,7 @@ VAL MKSTR(VM* vm, const char* str) {
161161 return cl;
162162}
163163
164−VAL MKPTR(VM* vm, const void* ptr) {
164+VAL MKPTR(VM* vm, void* ptr) {
165165 Closure* cl = allocate(vm, sizeof(Closure), 0);
166166 SETTY(cl, PTR);
167167 cl -> info.ptr = ptr;
@@ -452,7 +452,7 @@ void* runThread(void* arg) {
452452
453453 free(td);
454454
455− Stats stats = terminate(vm);
455+ // Stats stats = terminate(vm);
456456 // aggregate_stats(&(td->vm->stats), &stats);
457457 return NULL;
458458}
rts/idris_rts.h+1−1
@@ -143,7 +143,7 @@ typedef intptr_t i_int;
143143// Creating new values (each value placed at the top of the stack)
144144VAL MKFLOAT(VM* vm, double val);
145145VAL MKSTR(VM* vm, const char* str);
146−VAL MKPTR(VM* vm, const void* ptr);
146+VAL MKPTR(VM* vm, void* ptr);
147147VAL MKB8(VM* vm, uint8_t b);
148148VAL MKB16(VM* vm, uint16_t b);
149149VAL MKB32(VM* vm, uint32_t b);