Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
abc-interpreter
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
8
Issues
8
List
Boards
Labels
Service Desk
Milestones
Merge Requests
3
Merge Requests
3
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
clean-and-itasks
abc-interpreter
Commits
575ec017
Verified
Commit
575ec017
authored
Jun 02, 2020
by
Camil Staps
🚀
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix GCC warnings when comparing a char to EOF
parent
236f6570
Pipeline
#43199
passed with stages
in 22 minutes and 13 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
src/parse_abc.c
src/parse_abc.c
+3
-3
tools/interpretergen-c/specialized.icl
tools/interpretergen-c/specialized.icl
+1
-1
No files found.
src/parse_abc.c
View file @
575ec017
...
...
@@ -278,7 +278,7 @@ static int parse_integer (int64_t *integer_p)
static
int
parse_string_character
(
char
*
c_p
)
{
if
(
last_char
!=
'\\'
){
if
(
last_char
==
EOF
)
if
(
last_char
==
'\0'
)
return
0
;
*
c_p
=
last_char
;
last_char
=
next_character
();
...
...
@@ -308,7 +308,7 @@ static int parse_string_character (char *c_p)
case
'r'
:
*
c_p
=
'\r'
;
break
;
#endif
case
't'
:
*
c_p
=
'\t'
;
break
;
case
EOF
:
return
0
;
case
'\0'
:
return
0
;
default:
*
c_p
=
last_char
;
}
last_char
=
next_character
();
...
...
@@ -365,7 +365,7 @@ static int parse_descriptor_string (char *string,int *string_length_p)
while
(
last_char
!=
'"'
){
char
c
;
if
(
last_char
==
EOF
)
if
(
last_char
==
'\0'
)
abc_parser_error_i
(
"Error in string at line %d
\n
"
,
line_number
);
c
=
last_char
;
...
...
tools/interpretergen-c/specialized.icl
View file @
575ec017
...
...
@@ -159,7 +159,7 @@ instr_endF t = foldl (flip append) t
,
"
\t
IO_error(
\"
FEnd: not allowed for StdIO and StdErr
\"
);"
,
"else"
,
"
\t
h=f->file_handle;"
,
"
char
c=getc(h);"
,
"
int
c=getc(h);"
,
"if (c==EOF) {"
,
"
\t
*--bsp=1;"
,
"} else {"
...
...
Camil Staps
🚀
@cstaps
mentioned in issue
#95 (closed)
·
Jun 02, 2020
mentioned in issue
#95 (closed)
mentioned in issue #95
Toggle commit list
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment