Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
31efa863
Commit
31efa863
authored
Mar 24, 2006
by
jonas@perch.ndb.mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ndb -
still some compiler warnings
parent
14ec452b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
7 deletions
+31
-7
storage/ndb/include/util/OutputStream.hpp
storage/ndb/include/util/OutputStream.hpp
+8
-3
storage/ndb/include/util/SimpleProperties.hpp
storage/ndb/include/util/SimpleProperties.hpp
+11
-1
storage/ndb/src/kernel/vm/Pool.hpp
storage/ndb/src/kernel/vm/Pool.hpp
+12
-3
No files found.
storage/ndb/include/util/OutputStream.hpp
View file @
31efa863
...
...
@@ -25,6 +25,7 @@
*/
class
OutputStream
{
public:
virtual
~
OutputStream
()
{}
virtual
int
print
(
const
char
*
fmt
,
...)
=
0
;
virtual
int
println
(
const
char
*
fmt
,
...)
=
0
;
virtual
void
flush
()
{};
...
...
@@ -34,7 +35,8 @@ class FileOutputStream : public OutputStream {
FILE
*
f
;
public:
FileOutputStream
(
FILE
*
file
=
stdout
);
virtual
~
FileOutputStream
()
{}
int
print
(
const
char
*
fmt
,
...);
int
println
(
const
char
*
fmt
,
...);
void
flush
()
{
fflush
(
f
);
}
...
...
@@ -45,7 +47,8 @@ class SocketOutputStream : public OutputStream {
unsigned
m_timeout
;
public:
SocketOutputStream
(
NDB_SOCKET_TYPE
socket
,
unsigned
writeTimeout
=
1000
);
virtual
~
SocketOutputStream
()
{}
int
print
(
const
char
*
fmt
,
...);
int
println
(
const
char
*
fmt
,
...);
};
...
...
@@ -53,13 +56,15 @@ public:
class
SoftOseOutputStream
:
public
OutputStream
{
public:
SoftOseOutputStream
();
virtual
~
SoftOseOutputStream
()
{}
int
print
(
const
char
*
fmt
,
...);
int
println
(
const
char
*
fmt
,
...);
};
class
NullOutputStream
:
public
OutputStream
{
public:
virtual
~
NullOutputStream
()
{}
int
print
(
const
char
*
/* unused */
,
...)
{
return
1
;}
int
println
(
const
char
*
/* unused */
,
...)
{
return
1
;}
};
...
...
storage/ndb/include/util/SimpleProperties.hpp
View file @
31efa863
...
...
@@ -92,6 +92,8 @@ public:
*/
class
Reader
{
public:
virtual
~
Reader
()
{}
/**
* Move to first element
* Return true if element exist
...
...
@@ -164,6 +166,8 @@ public:
*/
class
Writer
{
public:
virtual
~
Writer
()
{}
bool
first
();
bool
add
(
Uint16
key
,
Uint32
value
);
bool
add
(
Uint16
key
,
const
char
*
value
);
...
...
@@ -183,6 +187,7 @@ public:
class
SimplePropertiesLinearReader
:
public
SimpleProperties
::
Reader
{
public:
SimplePropertiesLinearReader
(
const
Uint32
*
src
,
Uint32
len
);
virtual
~
SimplePropertiesLinearReader
()
{}
virtual
void
reset
();
virtual
bool
step
(
Uint32
len
);
...
...
@@ -201,7 +206,8 @@ private:
class
LinearWriter
:
public
SimpleProperties
::
Writer
{
public:
LinearWriter
(
Uint32
*
src
,
Uint32
len
);
virtual
~
LinearWriter
()
{}
virtual
bool
reset
();
virtual
bool
putWord
(
Uint32
val
);
virtual
bool
putWords
(
const
Uint32
*
src
,
Uint32
len
);
...
...
@@ -218,6 +224,7 @@ private:
class
UtilBufferWriter
:
public
SimpleProperties
::
Writer
{
public:
UtilBufferWriter
(
class
UtilBuffer
&
buf
);
virtual
~
UtilBufferWriter
()
{}
virtual
bool
reset
();
virtual
bool
putWord
(
Uint32
val
);
...
...
@@ -237,7 +244,9 @@ class SimplePropertiesSectionReader : public SimpleProperties::Reader {
public:
SimplePropertiesSectionReader
(
struct
SegmentedSectionPtr
&
,
class
SectionSegmentPool
&
);
virtual
~
SimplePropertiesSectionReader
()
{}
virtual
void
reset
();
virtual
bool
step
(
Uint32
len
);
virtual
bool
getWord
(
Uint32
*
dst
);
...
...
@@ -269,6 +278,7 @@ Uint32 SimplePropertiesSectionReader::getSize() const
class
SimplePropertiesSectionWriter
:
public
SimpleProperties
::
Writer
{
public:
SimplePropertiesSectionWriter
(
class
SectionSegmentPool
&
);
virtual
~
SimplePropertiesSectionWriter
()
{}
virtual
bool
reset
();
virtual
bool
putWord
(
Uint32
val
);
...
...
storage/ndb/src/kernel/vm/Pool.hpp
View file @
31efa863
...
...
@@ -213,10 +213,15 @@ inline
void
RecordPool
<
T
,
P
>::
init
(
Uint32
type_id
,
const
Pool_context
&
pc
)
{
T
tmp
;
const
char
*
off_base
=
(
char
*
)
&
tmp
;
const
char
*
off_next
=
(
char
*
)
&
tmp
.
nextPool
;
const
char
*
off_magic
=
(
char
*
)
&
tmp
.
m_magic
;
Record_info
ri
;
ri
.
m_size
=
sizeof
(
T
);
ri
.
m_offset_next_pool
=
offsetof
(
T
,
nextPool
);
ri
.
m_offset_magic
=
offsetof
(
T
,
m_magic
);
ri
.
m_offset_next_pool
=
Uint32
(
off_next
-
off_base
);
ri
.
m_offset_magic
=
Uint32
(
off_magic
-
off_base
);
ri
.
m_type_id
=
type_id
;
m_pool
.
init
(
ri
,
pc
);
}
...
...
@@ -226,10 +231,14 @@ inline
void
RecordPool
<
T
,
P
>::
wo_pool_init
(
Uint32
type_id
,
const
Pool_context
&
pc
)
{
T
tmp
;
const
char
*
off_base
=
(
char
*
)
&
tmp
;
const
char
*
off_magic
=
(
char
*
)
&
tmp
.
m_magic
;
Record_info
ri
;
ri
.
m_size
=
sizeof
(
T
);
ri
.
m_offset_next_pool
=
0
;
ri
.
m_offset_magic
=
offsetof
(
T
,
m_magic
);
ri
.
m_offset_magic
=
Uint32
(
off_magic
-
off_base
);
ri
.
m_type_id
=
type_id
;
m_pool
.
init
(
ri
,
pc
);
}
...
...
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