Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
T
tarantool
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
core
tarantool
Commits
ac1b26d7
Commit
ac1b26d7
authored
10 years ago
by
Roman Tsisyk
Committed by
Buildslave
10 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Fix clang warnings
parent
f32ac8cb
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
cmake/BuildLibEIO.cmake
+1
-0
1 addition, 0 deletions
cmake/BuildLibEIO.cmake
src/find_path.c
+3
-2
3 additions, 2 deletions
src/find_path.c
src/random.c
+4
-4
4 additions, 4 deletions
src/random.c
with
8 additions
and
6 deletions
cmake/BuildLibEIO.cmake
+
1
−
0
View file @
ac1b26d7
...
...
@@ -5,6 +5,7 @@ macro(libeio_build)
set
(
eio_compile_flags
"
${
eio_compile_flags
}
-Wno-unused-result"
)
set
(
eio_compile_flags
"
${
eio_compile_flags
}
-Wno-dangling-else"
)
set
(
eio_compile_flags
"
${
eio_compile_flags
}
-Wno-unused-value"
)
set
(
eio_compile_flags
"
${
eio_compile_flags
}
-DENABLE_BUNDLED_LIBEIO=1"
)
set
(
eio_compile_flags
"
${
eio_compile_flags
}
-DEIO_STACKSIZE=0"
)
...
...
This diff is collapsed.
Click to expand it.
src/find_path.c
+
3
−
2
View file @
ac1b26d7
...
...
@@ -21,7 +21,7 @@ find_path(const char *argv0)
return
path
;
char
buf
[
PATH_MAX
];
uint32
_t
size
=
PATH_MAX
-
1
;
size
_t
size
=
PATH_MAX
-
1
;
if
(
argv0
[
0
]
==
'/'
)
snprintf
(
buf
,
size
,
"%s"
,
argv0
);
else
{
...
...
@@ -35,7 +35,8 @@ find_path(const char *argv0)
snprintf
(
buf
,
size
,
"%s"
,
getexecname
());
rc
=
0
;
#elif defined(__APPLE__)
rc
=
_NSGetExecutablePath
(
buf
,
&
size
);
uint32_t
usize
=
size
;
rc
=
_NSGetExecutablePath
(
buf
,
&
usize
);
#endif
if
(
rc
==
-
1
)
snprintf
(
buf
,
sizeof
(
buf
)
-
1
,
"%s"
,
getenv
(
"_"
));
...
...
This diff is collapsed.
Click to expand it.
src/random.c
+
4
−
4
View file @
ac1b26d7
...
...
@@ -51,9 +51,8 @@ random_init(void)
}
int
flags
=
fcntl
(
rfd
,
F_GETFD
);
if
(
flags
<
0
)
goto
srand
;
fcntl
(
rfd
,
F_SETFD
,
flags
|
FD_CLOEXEC
);
if
(
flags
!=
-
1
)
fcntl
(
rfd
,
F_SETFD
,
flags
|
FD_CLOEXEC
);
read
(
rfd
,
&
seed
,
sizeof
(
seed
));
srand:
...
...
@@ -72,10 +71,11 @@ random_free(void)
void
random_bytes
(
char
*
buf
,
size_t
size
)
{
size_t
generated
=
0
;
if
(
rfd
==
-
1
)
goto
rand
;
size_t
generated
=
0
;
int
attempt
=
0
;
while
(
generated
<
size
)
{
ssize_t
n
=
read
(
rfd
,
buf
+
generated
,
size
-
generated
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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