Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
glslang
Project
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
Chen Yisong
glslang
Commits
1389e3e6
Commit
1389e3e6
authored
Aug 26, 2016
by
John Kessenich
Committed by
GitHub
Aug 26, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #488 from antiagainst/c4996-warning
Disable C4996 (secure CRT) recommendation on Windows for strtok().
parents
f00c245a
424cf80f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
ResourceLimits.cpp
StandAlone/ResourceLimits.cpp
+3
-0
No files found.
StandAlone/ResourceLimits.cpp
View file @
1389e3e6
...
@@ -241,8 +241,10 @@ std::string GetDefaultTBuiltInResourceString()
...
@@ -241,8 +241,10 @@ std::string GetDefaultTBuiltInResourceString()
void
DecodeResourceLimits
(
TBuiltInResource
*
resources
,
char
*
config
)
void
DecodeResourceLimits
(
TBuiltInResource
*
resources
,
char
*
config
)
{
{
const
char
*
delims
=
"
\t\n\r
"
;
const
char
*
delims
=
"
\t\n\r
"
;
#pragma warning(suppress: 4996)
const
char
*
token
=
strtok
(
config
,
delims
);
const
char
*
token
=
strtok
(
config
,
delims
);
while
(
token
)
{
while
(
token
)
{
#pragma warning(suppress: 4996)
const
char
*
valueStr
=
strtok
(
0
,
delims
);
const
char
*
valueStr
=
strtok
(
0
,
delims
);
if
(
valueStr
==
0
||
!
(
valueStr
[
0
]
==
'-'
||
(
valueStr
[
0
]
>=
'0'
&&
valueStr
[
0
]
<=
'9'
)))
{
if
(
valueStr
==
0
||
!
(
valueStr
[
0
]
==
'-'
||
(
valueStr
[
0
]
>=
'0'
&&
valueStr
[
0
]
<=
'9'
)))
{
printf
(
"Error: '%s' bad .conf file. Each name must be followed by one number.
\n
"
,
valueStr
?
valueStr
:
""
);
printf
(
"Error: '%s' bad .conf file. Each name must be followed by one number.
\n
"
,
valueStr
?
valueStr
:
""
);
...
@@ -438,6 +440,7 @@ void DecodeResourceLimits(TBuiltInResource* resources, char* config)
...
@@ -438,6 +440,7 @@ void DecodeResourceLimits(TBuiltInResource* resources, char* config)
else
else
printf
(
"Warning: unrecognized limit (%s) in configuration file.
\n
"
,
token
);
printf
(
"Warning: unrecognized limit (%s) in configuration file.
\n
"
,
token
);
#pragma warning(suppress: 4996)
token
=
strtok
(
0
,
delims
);
token
=
strtok
(
0
,
delims
);
}
}
}
}
...
...
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