Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
K
KWSys
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor 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
Martin Willers
KWSys
Commits
e6200f67
Commit
e6200f67
authored
19 years ago
by
Andy Cedilnik
Browse files
Options
Downloads
Patches
Plain Diff
COMP: Try to remove warnings
parent
801a9fd2
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Registry.cxx
+14
-18
14 additions, 18 deletions
Registry.cxx
with
14 additions
and
18 deletions
Registry.cxx
+
14
−
18
View file @
e6200f67
...
...
@@ -138,19 +138,19 @@ bool Registry::Open(const char *toplevel,
bool
res
=
false
;
if
(
m_Locked
)
{
return
0
;
return
res
;
}
if
(
m_Opened
)
{
if
(
!
this
->
Close
()
)
{
return
false
;
return
res
;
}
}
if
(
!
toplevel
||
!*
toplevel
)
{
kwsys_ios
::
cerr
<<
"Registry::Opened() Toplevel not defined"
<<
kwsys_ios
::
endl
;
return
false
;
return
res
;
}
if
(
isspace
(
toplevel
[
0
])
||
...
...
@@ -158,7 +158,7 @@ bool Registry::Open(const char *toplevel,
{
kwsys_ios
::
cerr
<<
"Toplevel has to start with letter or number and end"
" with one"
<<
kwsys_ios
::
endl
;
return
0
;
return
res
;
}
res
=
this
->
Helper
->
Open
(
toplevel
,
subkey
,
readonly
);
...
...
@@ -203,14 +203,14 @@ bool Registry::ReadValue(const char *subkey,
bool
open
=
false
;
if
(
!
value
)
{
return
false
;
return
res
;
}
if
(
!
m_Opened
)
{
if
(
!
this
->
Open
(
this
->
GetTopLevel
(),
subkey
,
Registry
::
READONLY
)
)
{
return
false
;
return
res
;
}
open
=
true
;
}
...
...
@@ -236,7 +236,7 @@ bool Registry::DeleteKey(const char *subkey, const char *key)
if
(
!
this
->
Open
(
this
->
GetTopLevel
(),
subkey
,
Registry
::
READWRITE
)
)
{
return
false
;
return
res
;
}
open
=
true
;
}
...
...
@@ -267,7 +267,7 @@ bool Registry::DeleteValue(const char *subkey, const char *key)
if
(
!
this
->
Open
(
this
->
GetTopLevel
(),
subkey
,
Registry
::
READWRITE
)
)
{
return
false
;
return
res
;
}
open
=
true
;
}
...
...
@@ -292,14 +292,14 @@ bool Registry::DeleteValue(const char *subkey, const char *key)
bool
Registry
::
SetValue
(
const
char
*
subkey
,
const
char
*
key
,
const
char
*
value
)
{
bool
res
=
tru
e
;
bool
res
=
fals
e
;
bool
open
=
false
;
if
(
!
m_Opened
)
{
if
(
!
this
->
Open
(
this
->
GetTopLevel
(),
subkey
,
Registry
::
READWRITE
)
)
{
return
false
;
return
res
;
}
open
=
true
;
}
...
...
@@ -555,12 +555,11 @@ bool RegistryHelper::ReadValue(const char *skey, const char **value)
{
return
false
;
}
int
res
=
1
;
DWORD
dwType
,
dwSize
;
dwType
=
REG_SZ
;
char
buffer
[
1024
];
// Replace with RegQueryInfoKey
dwSize
=
sizeof
(
buffer
);
res
=
(
RegQueryValueEx
(
this
->
HKey
,
skey
,
NULL
,
&
dwType
,
int
res
=
(
RegQueryValueEx
(
this
->
HKey
,
skey
,
NULL
,
&
dwType
,
(
BYTE
*
)
buffer
,
&
dwSize
)
==
ERROR_SUCCESS
);
if
(
!
res
)
{
...
...
@@ -600,8 +599,7 @@ bool RegistryHelper::DeleteKey(const char* skey)
#ifdef _WIN32
if
(
m_RegistryType
==
Registry
::
WIN32_REGISTRY
)
{
int
res
=
1
;
res
=
(
RegDeleteKey
(
this
->
HKey
,
skey
)
==
ERROR_SUCCESS
);
int
res
=
(
RegDeleteKey
(
this
->
HKey
,
skey
)
==
ERROR_SUCCESS
);
return
(
res
!=
0
);
}
#endif
...
...
@@ -624,8 +622,7 @@ bool RegistryHelper::DeleteValue(const char *skey)
#ifdef _WIN32
if
(
m_RegistryType
==
Registry
::
WIN32_REGISTRY
)
{
int
res
=
1
;
res
=
(
RegDeleteValue
(
this
->
HKey
,
skey
)
==
ERROR_SUCCESS
);
int
res
=
(
RegDeleteValue
(
this
->
HKey
,
skey
)
==
ERROR_SUCCESS
);
return
(
res
!=
0
);
}
#endif
...
...
@@ -648,9 +645,8 @@ bool RegistryHelper::SetValue(const char *skey, const char *value)
#ifdef _WIN32
if
(
m_RegistryType
==
Registry
::
WIN32_REGISTRY
)
{
int
res
=
1
;
DWORD
len
=
(
DWORD
)(
value
?
strlen
(
value
)
:
0
);
res
=
(
RegSetValueEx
(
this
->
HKey
,
skey
,
0
,
REG_SZ
,
int
res
=
(
RegSetValueEx
(
this
->
HKey
,
skey
,
0
,
REG_SZ
,
(
CONST
BYTE
*
)(
const
char
*
)
value
,
len
+
1
)
==
ERROR_SUCCESS
);
return
(
res
!=
0
);
...
...
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