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
49ad2b72
Commit
49ad2b72
authored
Oct 08, 2016
by
Alex Szpakowski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Address some compiler warnings.
- Add explicit casts from long to int. - Comment out method argument names that are unused. - Always initialize a boolean variable before it's read.
parent
19bdf90e
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
9 additions
and
9 deletions
+9
-9
InfoSink.h
glslang/Include/InfoSink.h
+1
-1
ParseContextBase.cpp
glslang/MachineIndependent/ParseContextBase.cpp
+2
-2
ParseHelper.cpp
glslang/MachineIndependent/ParseHelper.cpp
+1
-1
PpTokens.cpp
glslang/MachineIndependent/preprocessor/PpTokens.cpp
+2
-2
propagateNoContraction.cpp
glslang/MachineIndependent/propagateNoContraction.cpp
+1
-1
hlslParseHelper.cpp
hlsl/hlslParseHelper.cpp
+2
-2
No files found.
glslang/Include/InfoSink.h
View file @
49ad2b72
...
@@ -74,7 +74,7 @@ public:
...
@@ -74,7 +74,7 @@ public:
TInfoSinkBase
&
operator
<<
(
const
char
*
s
)
{
append
(
s
);
return
*
this
;
}
TInfoSinkBase
&
operator
<<
(
const
char
*
s
)
{
append
(
s
);
return
*
this
;
}
TInfoSinkBase
&
operator
<<
(
int
n
)
{
append
(
String
(
n
));
return
*
this
;
}
TInfoSinkBase
&
operator
<<
(
int
n
)
{
append
(
String
(
n
));
return
*
this
;
}
TInfoSinkBase
&
operator
<<
(
unsigned
int
n
)
{
append
(
String
(
n
));
return
*
this
;
}
TInfoSinkBase
&
operator
<<
(
unsigned
int
n
)
{
append
(
String
(
n
));
return
*
this
;
}
TInfoSinkBase
&
operator
<<
(
long
unsigned
int
n
)
{
append
(
String
(
n
));
return
*
this
;
}
TInfoSinkBase
&
operator
<<
(
long
unsigned
int
n
)
{
append
(
String
(
(
int
)
n
));
return
*
this
;
}
TInfoSinkBase
&
operator
<<
(
float
n
)
{
const
int
size
=
40
;
char
buf
[
size
];
TInfoSinkBase
&
operator
<<
(
float
n
)
{
const
int
size
=
40
;
char
buf
[
size
];
snprintf
(
buf
,
size
,
(
fabs
(
n
)
>
1e-8
&&
fabs
(
n
)
<
1e8
)
||
n
==
0
.
0
f
?
"%f"
:
"%g"
,
n
);
snprintf
(
buf
,
size
,
(
fabs
(
n
)
>
1e-8
&&
fabs
(
n
)
<
1e8
)
||
n
==
0
.
0
f
?
"%f"
:
"%g"
,
n
);
append
(
buf
);
append
(
buf
);
...
...
glslang/MachineIndependent/ParseContextBase.cpp
View file @
49ad2b72
...
@@ -320,8 +320,8 @@ bool TParseContextBase::insertGlobalUniformBlock()
...
@@ -320,8 +320,8 @@ bool TParseContextBase::insertGlobalUniformBlock()
if
(
globalUniformBlock
==
nullptr
)
if
(
globalUniformBlock
==
nullptr
)
return
true
;
return
true
;
int
numMembers
=
globalUniformBlock
->
getType
().
getStruct
()
->
size
();
int
numMembers
=
(
int
)
globalUniformBlock
->
getType
().
getStruct
()
->
size
();
bool
inserted
;
bool
inserted
=
false
;
if
(
firstNewMember
==
0
)
{
if
(
firstNewMember
==
0
)
{
// This is the first request; we need a normal symbol table insert
// This is the first request; we need a normal symbol table insert
inserted
=
symbolTable
.
insert
(
*
globalUniformBlock
);
inserted
=
symbolTable
.
insert
(
*
globalUniformBlock
);
...
...
glslang/MachineIndependent/ParseHelper.cpp
View file @
49ad2b72
...
@@ -1813,7 +1813,7 @@ TFunction* TParseContext::handleConstructorCall(const TSourceLoc& loc, const TPu
...
@@ -1813,7 +1813,7 @@ TFunction* TParseContext::handleConstructorCall(const TSourceLoc& loc, const TPu
}
}
// Handle seeing a precision qualifier in the grammar.
// Handle seeing a precision qualifier in the grammar.
void
TParseContext
::
handlePrecisionQualifier
(
const
TSourceLoc
&
loc
,
TQualifier
&
qualifier
,
TPrecisionQualifier
precision
)
void
TParseContext
::
handlePrecisionQualifier
(
const
TSourceLoc
&
/*loc*/
,
TQualifier
&
qualifier
,
TPrecisionQualifier
precision
)
{
{
if
(
obeyPrecisionQualifiers
())
if
(
obeyPrecisionQualifiers
())
qualifier
.
precision
=
precision
;
qualifier
.
precision
=
precision
;
...
...
glslang/MachineIndependent/preprocessor/PpTokens.cpp
View file @
49ad2b72
...
@@ -235,9 +235,9 @@ int TPpContext::ReadToken(TokenStream *pTok, TPpToken *ppToken)
...
@@ -235,9 +235,9 @@ int TPpContext::ReadToken(TokenStream *pTok, TPpToken *ppToken)
case
PpAtomConstInt
:
case
PpAtomConstInt
:
if
(
len
>
0
&&
tokenText
[
0
]
==
'0'
)
{
if
(
len
>
0
&&
tokenText
[
0
]
==
'0'
)
{
if
(
len
>
1
&&
(
tokenText
[
1
]
==
'x'
||
tokenText
[
1
]
==
'X'
))
if
(
len
>
1
&&
(
tokenText
[
1
]
==
'x'
||
tokenText
[
1
]
==
'X'
))
ppToken
->
ival
=
strtol
(
ppToken
->
name
,
0
,
16
);
ppToken
->
ival
=
(
int
)
strtol
(
ppToken
->
name
,
0
,
16
);
else
else
ppToken
->
ival
=
strtol
(
ppToken
->
name
,
0
,
8
);
ppToken
->
ival
=
(
int
)
strtol
(
ppToken
->
name
,
0
,
8
);
}
else
}
else
ppToken
->
ival
=
atoi
(
ppToken
->
name
);
ppToken
->
ival
=
atoi
(
ppToken
->
name
);
break
;
break
;
...
...
glslang/MachineIndependent/propagateNoContraction.cpp
View file @
49ad2b72
...
@@ -670,7 +670,7 @@ protected:
...
@@ -670,7 +670,7 @@ protected:
// Gets the struct dereference index that leads to 'precise' object.
// Gets the struct dereference index that leads to 'precise' object.
ObjectAccessChain
precise_accesschain_index_str
=
ObjectAccessChain
precise_accesschain_index_str
=
getFrontElement
(
remained_accesschain_
);
getFrontElement
(
remained_accesschain_
);
unsigned
precise_accesschain_index
=
strtoul
(
precise_accesschain_index_str
.
c_str
(),
nullptr
,
10
);
unsigned
precise_accesschain_index
=
(
unsigned
)
strtoul
(
precise_accesschain_index_str
.
c_str
(),
nullptr
,
10
);
// Gets the node pointed by the access chain index extracted before.
// Gets the node pointed by the access chain index extracted before.
glslang
::
TIntermTyped
*
potential_precise_node
=
glslang
::
TIntermTyped
*
potential_precise_node
=
node
->
getSequence
()[
precise_accesschain_index
]
->
getAsTyped
();
node
->
getSequence
()[
precise_accesschain_index
]
->
getAsTyped
();
...
...
hlsl/hlslParseHelper.cpp
View file @
49ad2b72
...
@@ -966,7 +966,7 @@ TIntermTyped* HlslParseContext::handleAssign(const TSourceLoc& loc, TOperator op
...
@@ -966,7 +966,7 @@ TIntermTyped* HlslParseContext::handleAssign(const TSourceLoc& loc, TOperator op
// Track how many items there are to copy.
// Track how many items there are to copy.
if
(
left
->
getType
().
isStruct
())
if
(
left
->
getType
().
isStruct
())
memberCount
=
left
->
getType
().
getStruct
()
->
size
();
memberCount
=
(
int
)
left
->
getType
().
getStruct
()
->
size
();
if
(
left
->
getType
().
isArray
())
if
(
left
->
getType
().
isArray
())
memberCount
=
left
->
getType
().
getCumulativeArraySize
();
memberCount
=
left
->
getType
().
getCumulativeArraySize
();
...
@@ -3980,7 +3980,7 @@ const TFunction* HlslParseContext::findFunction(const TSourceLoc& loc, const TFu
...
@@ -3980,7 +3980,7 @@ const TFunction* HlslParseContext::findFunction(const TSourceLoc& loc, const TFu
// 'parseType' is the type part of the declaration (to the left)
// 'parseType' is the type part of the declaration (to the left)
// 'arraySizes' is the arrayness tagged on the identifier (to the right)
// 'arraySizes' is the arrayness tagged on the identifier (to the right)
//
//
void
HlslParseContext
::
declareTypedef
(
const
TSourceLoc
&
loc
,
TString
&
identifier
,
const
TType
&
parseType
,
TArraySizes
*
arraySizes
)
void
HlslParseContext
::
declareTypedef
(
const
TSourceLoc
&
loc
,
TString
&
identifier
,
const
TType
&
parseType
,
TArraySizes
*
/*arraySizes*/
)
{
{
TType
type
;
TType
type
;
type
.
deepCopy
(
parseType
);
type
.
deepCopy
(
parseType
);
...
...
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