aboutsummaryrefslogtreecommitdiff
path: root/src/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime')
-rw-r--r--src/runtime/rt.zc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/runtime/rt.zc b/src/runtime/rt.zc
index 4f96320..a79387f 100644
--- a/src/runtime/rt.zc
+++ b/src/runtime/rt.zc
@@ -182,7 +182,7 @@ int put_s(char* s) {
// write the decimal form of a number, with a minus sign for a negative one.
// the smallest integer is handled as its own case.
int put_n(int n) {
- char[24] b; int i = 0;
+ char[24] b = {}; int i = 0;
if (n < 0) { put_c('-'); n = 0 - n; }
if (n < 0) { put_s("9223372036854775808"); return 0; }
while (1) { b[i++] = '0' + n % 10; n = n / 10; if (!n) break; }
@@ -340,7 +340,7 @@ int s_to_n(bstr s) {
}
// a new packed byte string holding the decimal form of n.
bstr n_to_s(int n) {
- word[24] b; int i = 0, j = 0, neg = 0; bstr p; char* t;
+ word[24] b = {}; int i = 0, j = 0, neg = 0; bstr p; char* t;
if (!n) { p = new_s(1); sput(p, 0, '0'); sput(p, 1, 0); return p; }
if (n < 0) { neg = 1; n = 0 - n; }
if (n < 0) {
@@ -431,7 +431,7 @@ const int F_HASDROP = 16, F_DROPPED = 32, F_FINAL = 64, F_CYCLE = 128; // F_CYCL
int o3_depth, gc_pending, gc_cyc; // gc_cyc: the last sweep found a cycle with drops to run
// flags live in these bits; the size class is above them.
const int F_LOW = 65535;
-int hbump; word[32] freel; int gc_runs, gc_freed, gc_auto = 1;
+int hbump; word[32] freel = {}; int gc_runs, gc_freed, gc_auto = 1;
// block walks and new chunks stop here.
int hstop;
// while nonzero, balloc will not return a block overlapping this range.
@@ -1201,7 +1201,7 @@ int line_of(word b, int a) {
}
// write the hexadecimal form of a number
int put_hex(int n) {
- char[20] b; int i = 0, d;
+ char[20] b = {}; int i = 0, d;
put_s("0x");
if (!n) { put_c('0'); return 0; }
while (n && i < 16) { d = n & 15; if (d < 10) b[i++] = '0' + d; else b[i++] = 'a' + d - 10; n = n >> 4; }