Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
paho.mqtt.c
Project
Project
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
eclipse
paho.mqtt.c
Commits
6b0502d1
Commit
6b0502d1
authored
Jun 28, 2017
by
Ian Craggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unused functions to fix compile warnings
parent
fca13278
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
18 deletions
+17
-18
Heap.c
src/Heap.c
+11
-12
MQTTAsync.c
src/MQTTAsync.c
+6
-6
No files found.
src/Heap.c
View file @
6b0502d1
...
...
@@ -3,11 +3,11 @@
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* and Eclipse Distribution License v1.0 which accompany this distribution.
* and Eclipse Distribution License v1.0 which accompany this distribution.
*
* The Eclipse Public License is available at
* The Eclipse Public License is available at
* http://www.eclipse.org/legal/epl-v10.html
* and the Eclipse Distribution License is available at
* and the Eclipse Distribution License is available at
* http://www.eclipse.org/org/documents/edl-v10.php.
*
* Contributors:
...
...
@@ -74,7 +74,7 @@ static const char *errmsg = "Memory allocation error";
static
size_t
Heap_roundup
(
size_t
size
);
static
int
ptrCompare
(
void
*
a
,
void
*
b
,
int
value
);
static
void
Heap_check
(
char
*
string
,
void
*
ptr
);
/*static void Heap_check(char* string, void* ptr);*/
static
void
checkEyecatchers
(
char
*
file
,
int
line
,
void
*
p
,
size_t
size
);
static
int
Internal_heap_unlink
(
char
*
file
,
int
line
,
void
*
p
);
static
void
HeapScan
(
enum
LOG_LEVELS
log_level
);
...
...
@@ -112,11 +112,10 @@ static int ptrCompare(void* a, void* b, int value)
return
(
a
>
b
)
?
-
1
:
(
a
==
b
)
?
0
:
1
;
}
/*
static void Heap_check(char* string, void* ptr)
{
return
;
/*Node* curnode = NULL;
Node* curnode = NULL;
storageElement* prev, *s = NULL;
printf("Heap_check start %p\n", ptr);
...
...
@@ -135,8 +134,8 @@ static void Heap_check(char* string, void* ptr)
else
printf("%s: heap order good %d %p %p\n", string, ptrCompare(s, prev, 1), prev->ptr, s->ptr);
}
}
*/
}
}
}
*/
/**
...
...
@@ -187,7 +186,7 @@ void* mymalloc(char* file, int line, size_t size)
state
.
current_size
+=
size
;
if
(
state
.
current_size
>
state
.
max_size
)
state
.
max_size
=
state
.
current_size
;
Thread_unlock_mutex
(
heap_mutex
);
Thread_unlock_mutex
(
heap_mutex
);
return
((
int
*
)(
s
->
ptr
))
+
1
;
/* skip start eyecatcher */
}
...
...
@@ -287,7 +286,7 @@ void *myrealloc(char* file, int line, void* p, size_t size)
{
void
*
rc
=
NULL
;
storageElement
*
s
=
NULL
;
Thread_lock_mutex
(
heap_mutex
);
s
=
TreeRemoveKey
(
&
heap
,
((
int
*
)
p
)
-
1
);
if
(
s
==
NULL
)
...
...
@@ -348,7 +347,7 @@ void* Heap_findItem(void* p)
static
void
HeapScan
(
enum
LOG_LEVELS
log_level
)
{
Node
*
current
=
NULL
;
Thread_lock_mutex
(
heap_mutex
);
Log
(
log_level
,
-
1
,
"Heap scan start, total %d bytes"
,
state
.
current_size
);
while
((
current
=
TreeNextElement
(
&
heap
,
current
))
!=
NULL
)
...
...
src/MQTTAsync.c
View file @
6b0502d1
...
...
@@ -345,7 +345,7 @@ static void MQTTAsync_terminate(void);
static
int
MQTTAsync_unpersistCommand
(
MQTTAsync_queuedCommand
*
qcmd
);
static
int
MQTTAsync_persistCommand
(
MQTTAsync_queuedCommand
*
qcmd
);
static
MQTTAsync_queuedCommand
*
MQTTAsync_restoreCommand
(
char
*
buffer
,
int
buflen
);
static
void
MQTTAsync_insertInOrder
(
List
*
list
,
void
*
content
,
int
size
);
/*static void MQTTAsync_insertInOrder(List* list, void* content, int size);*/
static
int
MQTTAsync_restoreCommands
(
MQTTAsyncs
*
client
);
#endif
static
int
MQTTAsync_addCommand
(
MQTTAsync_queuedCommand
*
command
,
int
command_size
);
...
...
@@ -377,7 +377,7 @@ static int MQTTAsync_countBufferedMessages(MQTTAsyncs* m);
static
void
MQTTAsync_retry
(
void
);
static
int
MQTTAsync_connecting
(
MQTTAsyncs
*
m
);
static
MQTTPacket
*
MQTTAsync_cycle
(
int
*
sock
,
unsigned
long
timeout
,
int
*
rc
);
static
int
pubCompare
(
void
*
a
,
void
*
b
);
/*static int pubCompare(void* a, void* b);*/
void
MQTTAsync_sleep
(
long
milliseconds
)
...
...
@@ -771,7 +771,7 @@ static MQTTAsync_queuedCommand* MQTTAsync_restoreCommand(char* buffer, int bufle
return
qcommand
;
}
/*
static void MQTTAsync_insertInOrder(List* list, void* content, int size)
{
ListElement* index = NULL;
...
...
@@ -786,7 +786,7 @@ static void MQTTAsync_insertInOrder(List* list, void* content, int size)
ListInsert(list, content, size, index);
FUNC_EXIT;
}
}
*/
static
int
MQTTAsync_restoreCommands
(
MQTTAsyncs
*
client
)
...
...
@@ -2996,12 +2996,12 @@ static MQTTPacket* MQTTAsync_cycle(int* sock, unsigned long timeout, int* rc)
return
pack
;
}
/*
static int pubCompare(void* a, void* b)
{
Messages* msg = (Messages*)a;
return msg->publish == (Publications*)b;
}
}
*/
int
MQTTAsync_getPendingTokens
(
MQTTAsync
handle
,
MQTTAsync_token
**
tokens
)
...
...
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