summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
0d2c983)
Error caught by Clang:
In file included from /home/giersch/lsrc/simgrid/simgrid-git/src/xbt/mmalloc/mm.c:21:
src/xbt/mmalloc/mmorecore.c:74:19: error: comparison of unsigned expression < 0 is always false [-Werror,-Wtautological-compare]
} else if (size < 0) {
It never returns NULL. Instead, it dies verbosely on errors. */
It never returns NULL. Instead, it dies verbosely on errors. */
-void *mmorecore(struct mdesc *mdp, size_t size)
+void *mmorecore(struct mdesc *mdp, ssize_t size)
{
ssize_t test = 0;
void *result; // please keep it uninitialized to track issues
{
ssize_t test = 0;
void *result; // please keep it uninitialized to track issues
/* Get core for the memory region specified by MDP, using SIZE as the
amount to either add to or subtract from the existing region. Works
like sbrk(), but using mmap(). */
/* Get core for the memory region specified by MDP, using SIZE as the
amount to either add to or subtract from the existing region. Works
like sbrk(), but using mmap(). */
-XBT_PUBLIC( void *)mmorecore(struct mdesc *mdp, size_t size);
+XBT_PUBLIC( void *)mmorecore(struct mdesc *mdp, ssize_t size);
/* Thread-safety (if the sem is already created)
*
/* Thread-safety (if the sem is already created)
*