mirror of
https://github.com/UberGames/lilium-voyager.git
synced 2024-12-13 21:51:09 +00:00
Fix compiler warnings (#4887)
This commit is contained in:
parent
e2e8b566e7
commit
92495a70bc
1 changed files with 10 additions and 1 deletions
|
@ -20,6 +20,9 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|||
===========================================================================
|
||||
*/
|
||||
|
||||
#define _ISOC99_SOURCE
|
||||
|
||||
#include "vm_local.h"
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
@ -238,9 +241,15 @@ static void hash_add_label(const char* label, unsigned address)
|
|||
{
|
||||
struct hashentry* h;
|
||||
unsigned i = hashkey(label, -1U);
|
||||
int labellen;
|
||||
|
||||
i %= sizeof(labelhash)/sizeof(labelhash[0]);
|
||||
h = malloc(sizeof(struct hashentry));
|
||||
h->label = strdup(label);
|
||||
|
||||
labellen = strlen(label);
|
||||
h->label = malloc(labellen);
|
||||
Com_sprintf(h->label, labellen, "%s", label);
|
||||
|
||||
h->address = address;
|
||||
h->next = labelhash[i];
|
||||
labelhash[i] = h;
|
||||
|
|
Loading…
Reference in a new issue