Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
CMake
CMake
Commits
809b32fe
Commit
809b32fe
authored
Mar 13, 2002
by
Bill Hoffman
Browse files
ENH: remove several compiler warnings
parent
83a0759e
Changes
25
Hide whitespace changes
Inline
Side-by-side
Source/CMakeLists.txt
View file @
809b32fe
...
...
@@ -25,6 +25,22 @@ cmCacheManager.cxx
cmCableClassSet.cxx
cmSourceGroup.cxx
cmListFileCache.cxx
cmake.h
cmakewizard.h
cmMakeDepend.h
cmMakefile.h
cmMakefileGenerator.h
cmRegularExpression.h
cmSourceFile.h
cmSystemTools.h
cmDirectory.h
cmCommands.h
cmTarget.h
cmCustomCommand.h
cmCacheManager.h
cmCableClassSet.h
cmSourceGroup.h
cmListFileCache.h
)
# configure the .h file
...
...
@@ -37,10 +53,20 @@ INCLUDE_DIRECTORIES(${CMake_BINARY_DIR}/Source)
ADD_DEFINITIONS
(
-DCMAKE_BUILD_WITH_CMAKE
)
IF
(
WIN32
)
SOURCE_FILES
(
SRCS cmDSWWriter.cxx cmDSPWriter.cxx cmMSProjectGenerator.cxx
)
SOURCE_FILES
(
SRCS cmBorlandMakefileGenerator.cxx
)
SOURCE_FILES
(
SRCS cmNMakeMakefileGenerator.cxx
)
SOURCE_FILES
(
SRCS cmMSDotNETGenerator.cxx
)
SOURCE_FILES
(
SRCS
cmDSWWriter.cxx
cmDSPWriter.cxx
cmMSProjectGenerator.cxx
cmBorlandMakefileGenerator.cxx
cmNMakeMakefileGenerator.cxx
cmMSDotNETGenerator.cxx
cmDSWWriter.cxx
cmDSPWriter.h
cmMSProjectGenerator.h
cmBorlandMakefileGenerator.h
cmNMakeMakefileGenerator.h
cmMSDotNETGenerator.h
)
IF
(
NOT UNIX
)
IF
(
NOT BORLAND
)
LINK_LIBRARIES
(
rpcrt4.lib
)
...
...
@@ -57,7 +83,7 @@ IF (UNIX)
ENDIF
(
CURSES_LIBRARY
)
ENDIF
(
UNIX
)
SOURCE_FILES
(
SRCS cmUnixMakefileGenerator.cxx
)
SOURCE_FILES
(
SRCS cmUnixMakefileGenerator.cxx
cmUnixMakefileGenerator.h
)
# create a library used by the command line and the GUI
...
...
Source/cmAuxSourceDirectoryCommand.cxx
View file @
809b32fe
...
...
@@ -35,8 +35,8 @@ bool cmAuxSourceDirectoryCommand::InitialPass(std::vector<std::string> const& ar
cmDirectory
dir
;
if
(
dir
.
Load
(
tdir
.
c_str
()))
{
in
t
numfiles
=
dir
.
GetNumberOfFiles
();
for
(
in
t
i
=
0
;
i
<
numfiles
;
++
i
)
size_
t
numfiles
=
dir
.
GetNumberOfFiles
();
for
(
size_
t
i
=
0
;
i
<
numfiles
;
++
i
)
{
std
::
string
file
=
dir
.
GetFile
(
i
);
// Split the filename into base and extension
...
...
Source/cmCableClassSet.cxx
View file @
809b32fe
...
...
@@ -86,7 +86,7 @@ void cmCableClassSet::AddSource(const char* name)
/**
* Get the size of the internal CableClassMap used to store the set.
*/
unsigned
in
t
cmCableClassSet
::
Size
()
const
size_
t
cmCableClassSet
::
Size
()
const
{
return
m_CableClassMap
.
size
();
}
...
...
Source/cmCableClassSet.h
View file @
809b32fe
...
...
@@ -70,7 +70,7 @@ public:
void
AddClass
(
const
char
*
,
cmCableClass
*
);
void
AddSource
(
const
char
*
name
);
unsigned
in
t
Size
()
const
;
size_
t
Size
()
const
;
CableClassMap
::
const_iterator
Begin
()
const
;
CableClassMap
::
const_iterator
End
()
const
;
...
...
Source/cmDirectory.cxx
View file @
809b32fe
...
...
@@ -39,7 +39,7 @@ cmDirectory
::
Load
(
const
char
*
name
)
{
char
*
buf
;
in
t
n
=
strlen
(
name
);
size_
t
n
=
strlen
(
name
);
if
(
name
[
n
-
1
]
==
'/'
)
{
buf
=
new
char
[
n
+
1
+
1
];
...
...
@@ -53,7 +53,7 @@ cmDirectory
struct
_finddata_t
data
;
// data of current file
// Now put them into the file array
long
srchHandle
=
_findfirst
(
buf
,
&
data
);
size_t
srchHandle
=
_findfirst
(
buf
,
&
data
);
delete
[]
buf
;
if
(
srchHandle
==
-
1
)
...
...
@@ -109,7 +109,7 @@ cmDirectory
*/
const
char
*
cmDirectory
::
GetFile
(
unsigned
in
t
index
)
::
GetFile
(
size_
t
index
)
{
if
(
index
>=
m_Files
.
size
()
)
{
...
...
Source/cmDirectory.h
View file @
809b32fe
...
...
@@ -42,12 +42,12 @@ public:
/**
* Return the number of files in the current directory.
*/
std
::
vector
<
std
::
string
>::
size_t
ype
GetNumberOfFiles
()
{
return
m_Files
.
size
();}
size_t
GetNumberOfFiles
()
{
return
m_Files
.
size
();}
/**
* Return the file at the given index, the indexing is 0 based
*/
const
char
*
GetFile
(
unsigned
int
index
);
const
char
*
GetFile
(
size_t
);
private:
std
::
vector
<
std
::
string
>
m_Files
;
// Array of Files
...
...
Source/cmFLTKWrapUICommand.cxx
View file @
809b32fe
...
...
@@ -101,14 +101,14 @@ void cmFLTKWrapUICommand::FinalPass()
{
// first we add the rules for all the .fl to .h and .cxx files
in
t
lastHeadersClass
=
m_GeneratedHeadersClasses
.
size
();
size_
t
lastHeadersClass
=
m_GeneratedHeadersClasses
.
size
();
std
::
string
fluid_exe
=
"${FLTK_FLUID_EXE}"
;
std
::
string
outputGUIDirectory
=
m_Makefile
->
GetCurrentOutputDirectory
();
// Generate code for all the .fl files
for
(
in
t
classNum
=
0
;
classNum
<
lastHeadersClass
;
classNum
++
)
for
(
size_
t
classNum
=
0
;
classNum
<
lastHeadersClass
;
classNum
++
)
{
// set up .fl to .h and .cxx command
std
::
string
hres
=
outputGUIDirectory
;
...
...
Source/cmFindFileCommand.cxx
View file @
809b32fe
...
...
@@ -30,7 +30,7 @@ bool cmFindFileCommand::InitialPass(std::vector<std::string> const& argsIn)
}
std
::
string
helpString
=
"Where can the "
;
helpString
+=
argsIn
[
1
]
+
" file be found"
;
unsigned
in
t
size
=
argsIn
.
size
();
size_
t
size
=
argsIn
.
size
();
std
::
vector
<
std
::
string
>
args
;
for
(
unsigned
int
j
=
0
;
j
<
size
;
++
j
)
{
...
...
Source/cmFindLibraryCommand.cxx
View file @
809b32fe
...
...
@@ -26,7 +26,7 @@ bool cmFindLibraryCommand::InitialPass(std::vector<std::string> const& argsIn)
return
false
;
}
std
::
string
helpString
;
unsigned
in
t
size
=
argsIn
.
size
();
size_
t
size
=
argsIn
.
size
();
std
::
vector
<
std
::
string
>
args
;
for
(
unsigned
int
j
=
0
;
j
<
size
;
++
j
)
{
...
...
Source/cmFindPathCommand.cxx
View file @
809b32fe
...
...
@@ -31,7 +31,7 @@ bool cmFindPathCommand::InitialPass(std::vector<std::string> const& argsIn)
std
::
string
helpString
=
"What is the path where the file "
;
helpString
+=
argsIn
[
1
]
+
" can be found"
;
std
::
vector
<
std
::
string
>
args
;
unsigned
in
t
size
=
argsIn
.
size
();
size_
t
size
=
argsIn
.
size
();
for
(
unsigned
int
j
=
0
;
j
<
size
;
++
j
)
{
if
(
argsIn
[
j
]
!=
"DOC"
)
...
...
Source/cmFindProgramCommand.cxx
View file @
809b32fe
...
...
@@ -29,7 +29,7 @@ bool cmFindProgramCommand::InitialPass(std::vector<std::string> const& argsIn)
return
false
;
}
std
::
string
doc
=
"Path to a program."
;
unsigned
in
t
size
=
argsIn
.
size
();
size_
t
size
=
argsIn
.
size
();
std
::
vector
<
std
::
string
>
args
;
for
(
unsigned
int
j
=
0
;
j
<
size
;
++
j
)
{
...
...
Source/cmMSDotNETGenerator.cxx
View file @
809b32fe
...
...
@@ -360,7 +360,7 @@ void cmMSDotNETGenerator::WriteProject(std::ostream& fout,
const
char
*
dspname
,
const
char
*
dir
,
cmMSDotNETGenerator
*
,
const
cmTarget
&
target
const
cmTarget
&
)
{
std
::
string
d
=
cmSystemTools
::
ConvertToOutputPath
(
dir
);
...
...
@@ -377,7 +377,7 @@ void cmMSDotNETGenerator::WriteProject(std::ostream& fout,
// the libraries it uses are also done here
void
cmMSDotNETGenerator
::
WriteProjectDepends
(
std
::
ostream
&
fout
,
const
char
*
dspname
,
const
char
*
dir
,
const
char
*
,
cmMSDotNETGenerator
*
,
const
cmTarget
&
target
)
...
...
@@ -441,10 +441,10 @@ void cmMSDotNETGenerator::WriteProjectConfigurations(std::ostream& fout, const c
// Write a dsp file into the SLN file,
// Note, that dependencies from executables to
// the libraries it uses are also done here
void
cmMSDotNETGenerator
::
WriteExternalProject
(
std
::
ostream
&
fout
,
const
char
*
name
,
const
char
*
location
,
const
std
::
vector
<
std
::
string
>&
dependencies
)
void
cmMSDotNETGenerator
::
WriteExternalProject
(
std
::
ostream
&
,
const
char
*
,
const
char
*
,
const
std
::
vector
<
std
::
string
>&
)
{
cmSystemTools
::
Error
(
"WriteExternalProject not implemented"
);
// fout << "#########################################################"
...
...
@@ -907,9 +907,9 @@ void cmMSDotNETGenerator::OutputModuleDefinitionFile(std::ostream& fout,
}
void
cmMSDotNETGenerator
::
OutputLibraryDirectories
(
std
::
ostream
&
fout
,
const
char
*
configName
,
const
char
*
libName
,
const
cmTarget
&
target
)
const
char
*
,
const
char
*
,
const
cmTarget
&
)
{
bool
hasone
=
false
;
if
(
m_LibraryOutputPath
.
size
())
...
...
@@ -1197,7 +1197,7 @@ void cmMSDotNETGenerator::WriteCustomRule(std::ostream& fout,
void
cmMSDotNETGenerator
::
WriteVCProjBeginGroup
(
std
::
ostream
&
fout
,
const
char
*
group
,
const
char
*
filter
)
const
char
*
)
{
fout
<<
"
\t\t
<Filter
\n
"
<<
"
\t\t\t
Name=
\"
"
<<
group
<<
"
\"\n
"
...
...
@@ -1288,7 +1288,7 @@ void cmMSDotNETGenerator::OutputTargetRules(std::ostream& fout,
}
void
cmMSDotNETGenerator
::
WriteProjectStart
(
std
::
ostream
&
fout
,
const
char
*
libName
,
const
cmTarget
&
target
,
const
cmTarget
&
,
std
::
vector
<
cmSourceGroup
>
&
)
{
fout
<<
"<?xml version=
\"
1.0
\"
encoding =
\"
Windows-1252
\"
?>
\n
"
...
...
Source/cmMakefile.cxx
View file @
809b32fe
...
...
@@ -322,8 +322,8 @@ bool cmMakefile::ReadListFile(const char* filename, const char* external)
}
// add this list file to the list of dependencies
m_ListFiles
.
push_back
(
filenametoread
);
const
in
t
numberFunctions
=
lf
->
m_Functions
.
size
();
for
(
in
t
i
=
0
;
i
<
numberFunctions
;
++
i
)
const
size_
t
numberFunctions
=
lf
->
m_Functions
.
size
();
for
(
size_
t
i
=
0
;
i
<
numberFunctions
;
++
i
)
{
cmListFileFunction
&
curFunction
=
lf
->
m_Functions
[
i
];
if
(
!
this
->
IsFunctionBlocked
(
curFunction
.
m_Name
.
c_str
(),
...
...
Source/cmNMakeMakefileGenerator.cxx
View file @
809b32fe
...
...
@@ -54,7 +54,7 @@ std::string cmNMakeMakefileGenerator::ShortPath(const char* path)
// if there are spaces then call GetShortPathName to get rid of them
char
*
buffer
=
new
char
[
strlen
(
path
)
+
1
];
if
(
GetShortPathName
(
path
,
buffer
,
strlen
(
path
)
+
1
)
!=
0
)
static_cast
<
int
>
(
strlen
(
path
)
+
1
)
)
!=
0
)
{
ret
=
buffer
;
}
...
...
Source/cmQTWrapCPPCommand.cxx
View file @
809b32fe
...
...
@@ -89,7 +89,7 @@ void cmQTWrapCPPCommand::FinalPass()
{
// first we add the rules for all the .h to Moc files
in
t
lastClass
=
m_WrapClasses
.
size
();
size_
t
lastClass
=
m_WrapClasses
.
size
();
std
::
vector
<
std
::
string
>
depends
;
std
::
string
moc_exe
=
"${QT_MOC_EXE}"
;
...
...
@@ -105,7 +105,7 @@ void cmQTWrapCPPCommand::FinalPass()
moc_list
=
moc_list
+
GENERATED_QT_FILES_value
;
}
for
(
in
t
classNum
=
0
;
classNum
<
lastClass
;
classNum
++
)
for
(
size_
t
classNum
=
0
;
classNum
<
lastClass
;
classNum
++
)
{
// Add output to build list
m_Makefile
->
AddSource
(
m_WrapClasses
[
classNum
],
m_SourceList
.
c_str
());
...
...
Source/cmQTWrapUICommand.cxx
View file @
809b32fe
...
...
@@ -111,7 +111,7 @@ void cmQTWrapUICommand::FinalPass()
{
// first we add the rules for all the .ui to .h and .cxx files
in
t
lastHeadersClass
=
m_WrapHeadersClasses
.
size
();
size_
t
lastHeadersClass
=
m_WrapHeadersClasses
.
size
();
std
::
vector
<
std
::
string
>
depends
;
std
::
string
uic_exe
=
"${QT_UIC_EXE}"
;
std
::
string
moc_exe
=
"${QT_MOC_EXE}"
;
...
...
@@ -128,7 +128,7 @@ void cmQTWrapUICommand::FinalPass()
ui_list
=
ui_list
+
GENERATED_QT_FILES_value
;
}
for
(
in
t
classNum
=
0
;
classNum
<
lastHeadersClass
;
classNum
++
)
for
(
size_
t
classNum
=
0
;
classNum
<
lastHeadersClass
;
classNum
++
)
{
// set up .ui to .h and .cxx command
...
...
Source/cmRegularExpression.cxx
View file @
809b32fe
...
...
@@ -376,7 +376,7 @@ void cmRegularExpression::compile (const char* exp) {
for
(;
scan
!=
NULL
;
scan
=
regnext
(
scan
))
if
(
OP
(
scan
)
==
EXACTLY
&&
strlen
(
OPERAND
(
scan
))
>=
len
)
{
longest
=
OPERAND
(
scan
);
len
=
strlen
(
OPERAND
(
scan
));
len
=
int
(
strlen
(
OPERAND
(
scan
))
)
;
}
this
->
regmust
=
longest
;
this
->
regmlen
=
len
;
...
...
@@ -675,7 +675,7 @@ static char* regatom (int *flagp) {
register
char
ender
;
regparse
--
;
len
=
strcspn
(
regparse
,
META
);
len
=
int
(
strcspn
(
regparse
,
META
)
)
;
if
(
len
<=
0
)
{
//RAISE Error, SYM(cmRegularExpression), SYM(Internal_Error),
printf
(
"cmRegularExpression::compile(): Internal error.
\n
"
);
...
...
@@ -784,9 +784,9 @@ static void regtail (char* p, const char* val) {
}
if
(
OP
(
scan
)
==
BACK
)
offset
=
(
const
char
*
)
scan
-
val
;
offset
=
int
(
scan
-
val
)
;
else
offset
=
val
-
scan
;
offset
=
int
(
val
-
scan
)
;
*
(
scan
+
1
)
=
(
offset
>>
8
)
&
0377
;
*
(
scan
+
2
)
=
offset
&
0377
;
}
...
...
@@ -969,7 +969,7 @@ static int regmatch (const char* prog) {
// Inline the first character, for speed.
if
(
*
opnd
!=
*
reginput
)
return
(
0
);
len
=
strlen
(
opnd
);
len
=
int
(
strlen
(
opnd
)
)
;
if
(
len
>
1
&&
strncmp
(
opnd
,
reginput
,
len
)
!=
0
)
return
(
0
);
reginput
+=
len
;
...
...
@@ -1128,7 +1128,7 @@ static int regrepeat (const char* p) {
opnd
=
OPERAND
(
p
);
switch
(
OP
(
p
))
{
case
ANY
:
count
=
strlen
(
scan
);
count
=
int
(
strlen
(
scan
)
)
;
scan
+=
count
;
break
;
case
EXACTLY
:
...
...
Source/cmSourceGroup.cxx
View file @
809b32fe
...
...
@@ -122,8 +122,10 @@ void cmSourceGroup::Print() const
std
::
cout
<<
"FullCommand: "
<<
j
->
first
.
c_str
()
<<
"
\n
"
;
std
::
cout
<<
"Command: "
<<
j
->
second
.
m_Command
.
c_str
()
<<
"
\n
"
;
std
::
cout
<<
"Arguments: "
<<
j
->
second
.
m_Arguments
.
c_str
()
<<
"
\n
"
;
std
::
cout
<<
"Command Outputs "
<<
j
->
second
.
m_Outputs
.
size
()
<<
"
\n
"
;
std
::
cout
<<
"Command Depends "
<<
j
->
second
.
m_Depends
.
size
()
<<
"
\n
"
;
std
::
cout
<<
"Command Outputs "
<<
static_cast
<
int
>
(
j
->
second
.
m_Outputs
.
size
())
<<
"
\n
"
;
std
::
cout
<<
"Command Depends "
<<
static_cast
<
int
>
(
j
->
second
.
m_Depends
.
size
())
<<
"
\n
"
;
}
}
}
...
...
Source/cmSystemTools.cxx
View file @
809b32fe
...
...
@@ -637,7 +637,7 @@ void cmSystemTools::GetArguments(std::string& line,
while
(
!
done
)
{
std
::
string
arg
;
unsigned
int
endpos
;
std
::
string
::
size_type
endpos
;
bool
foundQuoted
=
quotedArgument
.
find
(
line
.
c_str
());
bool
foundNormal
=
normalArgument
.
find
(
line
.
c_str
());
...
...
@@ -1427,7 +1427,8 @@ void cmSystemTools::Glob(const char *directory, const char *regexp,
if
(
d
.
Load
(
directory
))
{
unsigned
int
i
,
numf
;
size_t
numf
;
unsigned
int
i
;
numf
=
d
.
GetNumberOfFiles
();
for
(
i
=
0
;
i
<
numf
;
i
++
)
{
...
...
Source/cmVTKMakeInstantiatorCommand.cxx
View file @
809b32fe
...
...
@@ -174,10 +174,10 @@ cmVTKMakeInstantiatorCommand
m_Makefile
->
AddSource
(
file
,
outSourceList
.
c_str
());
}
unsigned
in
t
numClasses
=
m_Classes
.
size
();
unsigned
in
t
numFullBlocks
=
numClasses
/
groupSize
;
unsigned
in
t
lastBlockSize
=
numClasses
%
groupSize
;
unsigned
in
t
numBlocks
=
numFullBlocks
+
((
lastBlockSize
>
0
)
?
1
:
0
);
size_
t
numClasses
=
m_Classes
.
size
();
size_
t
numFullBlocks
=
numClasses
/
groupSize
;
size_
t
lastBlockSize
=
numClasses
%
groupSize
;
size_
t
numBlocks
=
numFullBlocks
+
((
lastBlockSize
>
0
)
?
1
:
0
);
// Generate the files with the ::New() calls to each class. These
// are done in groups to keep the translation unit size smaller.
...
...
Prev
1
2
Next
Write
Preview
Supports
Markdown
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