Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
BC
public
bctoolbox
Commits
d5701e84
Commit
d5701e84
authored
2 years ago
by
Simon Morlat
Browse files
Options
Download
Patches
Plain Diff
Fix gcc12 warning.
parent
c04c3857
fix/xcode-compilation-issues-2
1 merge request
!173
Fix gcc12 warning.
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/utils/port.c
+2
-1
src/utils/port.c
with
2 additions
and
1 deletion
src/utils/port.c
+
2
−
1
View file @
d5701e84
...
...
@@ -1508,6 +1508,7 @@ char * bctbx_concat(const char *str, ...) {
/* Resize the allocated memory if necessary. */
if
(
wp
+
len
+
1
>
result
+
allocated
)
{
intptr_t
current_offset
=
wp
-
result
;
allocated
=
(
allocated
+
len
)
*
2
;
newp
=
(
char
*
)
realloc
(
result
,
allocated
);
if
(
newp
==
NULL
)
...
...
@@ -1515,7 +1516,7 @@ char * bctbx_concat(const char *str, ...) {
free
(
result
);
return
NULL
;
}
wp
=
newp
+
(
wp
-
result
)
;
wp
=
newp
+
current_offset
;
result
=
newp
;
}
memcpy
(
wp
,
s
,
len
);
...
...
This diff is collapsed.
Click to expand it.
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets