aboutsummaryrefslogtreecommitdiffstats
path: root/src/server
diff options
context:
space:
mode:
Diffstat (limited to 'src/server')
-rw-r--r--src/server/buffer.nim4
-rw-r--r--src/server/forkserver.nim4
-rw-r--r--src/server/loader.nim4
3 files changed, 6 insertions, 6 deletions
diff --git a/src/server/buffer.nim b/src/server/buffer.nim
index da9b8bb5..bbae50f2 100644
--- a/src/server/buffer.nim
+++ b/src/server/buffer.nim
@@ -295,7 +295,7 @@ macro proxy1(fun: typed) =
pfun.iname = ident(fun[0].strVal & "_internal")
pfun.ename = iproc[1]
pfun.params.add(fun[3][0])
- var params2: seq[NimNode]
+ var params2: seq[NimNode] = @[]
params2.add(fun[3][0])
for i in 1 ..< fun[3].len:
let param = fun[3][i]
@@ -956,7 +956,7 @@ var gpstream* {.global.}: SocketStream
# Create an exact clone of the current buffer.
# This clone will share the loader process with the previous buffer.
proc clone*(buffer: Buffer; newurl: URL): int {.proxy.} =
- var pipefd: array[2, cint]
+ var pipefd {.noinit.}: array[2, cint]
if pipe(pipefd) == -1:
buffer.estream.write("Failed to open pipe.\n")
return -1
diff --git a/src/server/forkserver.nim b/src/server/forkserver.nim
index 5fedf484..3352b39d 100644
--- a/src/server/forkserver.nim
+++ b/src/server/forkserver.nim
@@ -81,7 +81,7 @@ proc trapSIGINT() =
setControlCHook(proc() {.noconv.} = discard)
proc forkLoader(ctx: var ForkServerContext; config: LoaderConfig): int =
- var pipefd: array[2, cint]
+ var pipefd {.noinit.}: array[2, cint]
if pipe(pipefd) == -1:
raise newException(Defect, "Failed to open pipe.")
stdout.flushFile()
@@ -127,7 +127,7 @@ proc forkBuffer(ctx: var ForkServerContext; r: var BufferedReader): int =
r.sread(attrs)
r.sread(ishtml)
r.sread(charsetStack)
- var pipefd: array[2, cint]
+ var pipefd {.noinit.}: array[2, cint]
if pipe(pipefd) == -1:
raise newException(Defect, "Failed to open pipe.")
stdout.flushFile()
diff --git a/src/server/loader.nim b/src/server/loader.nim
index 60e37610..31c4f767 100644
--- a/src/server/loader.nim
+++ b/src/server/loader.nim
@@ -1134,7 +1134,7 @@ proc addClient(ctx: LoaderContext; stream: SocketStream;
r.sread(config)
r.sread(clonedFrom)
stream.withPacketWriter w:
- if pid in ctx.clientData or key == default(ClientKey):
+ if pid in ctx.clientData or key == ClientKey.default:
w.swrite(false)
else:
let client = ClientData(pid: pid, key: key, config: config)
@@ -1401,7 +1401,7 @@ proc initLoaderContext(fd: cint; config: LoaderConfig): LoaderContext =
# pager's key is still null
var key: ClientKey
r.sread(key)
- doAssert key == default(ClientKey)
+ doAssert key == ClientKey.default
var cmd: LoaderCommand
r.sread(cmd)
doAssert cmd == lcAddClient