on master help sign in
Merge branch 'feature/cwarnings-removal' of https://github.com/ahmadsalim/Idris-dev into ahmadsalim-feature/cwarnings-removal
d33d0bfEdwin Brady
rts/idris_opts.c+3−4
@@ -6,18 +6,17 @@
6#include <string.h>
6#include <string.h>
7
7
8
8
9−const char usage[] =
9+#define USAGE "\n" \
10− "\n" \
11 "Usage: <prog> [+RTS <rtsopts> -RTS] <args>\n\n" \
10 "Usage: <prog> [+RTS <rtsopts> -RTS] <args>\n\n" \
12 "Options:\n\n" \
11 "Options:\n\n" \
13 " -? Print this message and exits.\n" \
12 " -? Print this message and exits.\n" \
14 " -s Summary GC statistics.\n" \
13 " -s Summary GC statistics.\n" \
15 " -H Initial heap size. Egs: -H4M, -H500K, -H1G\n" \
14 " -H Initial heap size. Egs: -H4M, -H500K, -H1G\n" \
16 " -K Sets the maximum stack size. Egs: -K8M\n" \
15 " -K Sets the maximum stack size. Egs: -K8M\n" \
17− "\n";
16+ "\n"
18
17
19void print_usage(FILE * s) {
18void print_usage(FILE * s) {
20− fprintf(s, usage);
19+ fprintf(s, USAGE);
21}
20}
22
21
23int read_size(char * str) {
22int read_size(char * str) {
rts/idris_rts.c+2−2
@@ -161,7 +161,7 @@ VAL MKSTR(VM* vm, const char* str) {
161 return cl;
161 return cl;
162}
162}
163
163
164−VAL MKPTR(VM* vm, const void* ptr) {
164+VAL MKPTR(VM* vm, void* ptr) {
165 Closure* cl = allocate(vm, sizeof(Closure), 0);
165 Closure* cl = allocate(vm, sizeof(Closure), 0);
166 SETTY(cl, PTR);
166 SETTY(cl, PTR);
167 cl -> info.ptr = ptr;
167 cl -> info.ptr = ptr;
@@ -452,7 +452,7 @@ void* runThread(void* arg) {
452
452
453 free(td);
453 free(td);
454
454
455− Stats stats = terminate(vm);
455+ // Stats stats = terminate(vm);
456 // aggregate_stats(&(td->vm->stats), &stats);
456 // aggregate_stats(&(td->vm->stats), &stats);
457 return NULL;
457 return NULL;
458}
458}
rts/idris_rts.h+1−1
@@ -143,7 +143,7 @@ typedef intptr_t i_int;
143// Creating new values (each value placed at the top of the stack)
143// Creating new values (each value placed at the top of the stack)
144VAL MKFLOAT(VM* vm, double val);
144VAL MKFLOAT(VM* vm, double val);
145VAL MKSTR(VM* vm, const char* str);
145VAL MKSTR(VM* vm, const char* str);
146−VAL MKPTR(VM* vm, const void* ptr);
146+VAL MKPTR(VM* vm, void* ptr);
147VAL MKB8(VM* vm, uint8_t b);
147VAL MKB8(VM* vm, uint8_t b);
148VAL MKB16(VM* vm, uint16_t b);
148VAL MKB16(VM* vm, uint16_t b);
149VAL MKB32(VM* vm, uint32_t b);
149VAL MKB32(VM* vm, uint32_t b);