Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
71591a1d
Commit
71591a1d
authored
Oct 01, 1996
by
Jim Wilson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(used_arg): When call xmalloc for mswitches, pass 1 if
n_switches is zero. From-SVN: r12885
parent
afad3d2c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
gcc/gcc.c
+7
-2
No files found.
gcc/gcc.c
View file @
71591a1d
...
...
@@ -4982,8 +4982,13 @@ used_arg (p, len)
break
;
}
/* Now build a list of the replacement string for switches that we care about */
mswitches
=
(
struct
mswitchstr
*
)
xmalloc
((
sizeof
(
struct
mswitchstr
))
*
n_switches
);
/* Now build a list of the replacement string for switches that we care
about. Make sure we allocate at least one entry. This prevents
xmalloc from calling fatal, and prevents us from re-executing this
block of code. */
mswitches
=
(
struct
mswitchstr
*
)
xmalloc
((
sizeof
(
struct
mswitchstr
))
*
(
n_switches
?
n_switches
:
1
));
for
(
i
=
0
;
i
<
n_switches
;
i
++
)
{
int
xlen
=
strlen
(
switches
[
i
].
part1
);
...
...
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