Skip to content

Commit 800163a

Browse files
committed
more volatile
1 parent 6cb360c commit 800163a

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/streams.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ Obj READ_ALL_COMMANDS(Obj instream, Obj echo, Obj capture, Obj resultCallback)
138138
RequireInputStream("READ_ALL_COMMANDS", instream);
139139

140140
// try to open the streams
141-
TypInputFile input;
141+
volatile TypInputFile input;
142142
if (!OpenInputStream(&input, instream, echo == True)) {
143143
return Fail;
144144
}
@@ -148,7 +148,7 @@ Obj READ_ALL_COMMANDS(Obj instream, Obj echo, Obj capture, Obj resultCallback)
148148
outstream = DoOperation2Args(ValGVar(GVarName("OutputTextString")),
149149
outstreamString, True);
150150
}
151-
TypOutputFile output;
151+
volatile TypOutputFile output;
152152
if (outstream && !OpenOutputStream(&output, outstream)) {
153153
CloseInput(&input);
154154
return Fail;
@@ -241,7 +241,7 @@ static Obj FuncREAD_COMMAND_REAL(Obj self, Obj stream, Obj echo)
241241
AssPlist(result, 1, False);
242242

243243
// open the stream, read a command, and close it again
244-
TypInputFile input;
244+
volatile TypInputFile input;
245245
if (!OpenInputStream(&input, stream, echo == True)) {
246246
return result;
247247
}
@@ -413,7 +413,7 @@ Int READ_GAP_ROOT ( const Char * filename )
413413
Pr("#I READ_GAP_ROOT: loading '%s' as GAP file\n", (Int)filename, 0);
414414
}
415415

416-
TypInputFile input;
416+
volatile TypInputFile input;
417417
if (!OpenInput(&input, path))
418418
return 0;
419419

@@ -454,7 +454,7 @@ static Obj FuncCALL_WITH_STREAM(Obj self, Obj stream, Obj func, Obj args)
454454
RequireOutputStream(SELF_NAME, stream);
455455
RequireSmallList(SELF_NAME, args);
456456

457-
TypOutputFile output;
457+
volatile TypOutputFile output;
458458
if (!OpenOutputStream(&output, stream)) {
459459
ErrorQuit("CALL_WITH_STREAM: cannot open stream for output", 0, 0);
460460
}
@@ -698,7 +698,7 @@ static Obj PRINT_OR_APPEND_TO_FILE_OR_STREAM(Obj args, int append, int file)
698698
// first entry is the file or stream
699699
destination = ELM_LIST(args, 1);
700700

701-
TypOutputFile output;
701+
volatile TypOutputFile output;
702702

703703
// try to open the output and handle failures
704704
if (file) {
@@ -819,7 +819,7 @@ static Obj FuncAPPEND_TO_STREAM(Obj self, Obj args)
819819
*/
820820
static Obj FuncREAD(Obj self, Obj inputObj)
821821
{
822-
TypInputFile input;
822+
volatile TypInputFile input;
823823
if (!OpenInputFileOrStream(SELF_NAME, &input, inputObj))
824824
return False;
825825

@@ -866,12 +866,12 @@ static Obj FuncREAD_STREAM_LOOP(Obj self,
866866
"must be a local variables bag "
867867
"or the value 'false'");
868868

869-
TypInputFile input;
869+
volatile TypInputFile input;
870870
if (!OpenInputStream(&input, instream, FALSE)) {
871871
return False;
872872
}
873873

874-
TypOutputFile output;
874+
volatile TypOutputFile output;
875875
if (!OpenOutputStream(&output, outstream)) {
876876
res = CloseInput(&input);
877877
GAP_ASSERT(res);
@@ -946,7 +946,7 @@ static Obj FuncREAD_STREAM_LOOP(Obj self,
946946
*/
947947
static Obj FuncREAD_AS_FUNC(Obj self, Obj inputObj)
948948
{
949-
TypInputFile input;
949+
volatile TypInputFile input;
950950
if (!OpenInputFileOrStream(SELF_NAME, &input, inputObj))
951951
return False;
952952

0 commit comments

Comments
 (0)