[quake3-commits] r1824 - trunk/code/qcommon

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Thu Jan 27 06:13:39 EST 2011


Author: thilo
Date: 2011-01-27 06:13:39 -0500 (Thu, 27 Jan 2011)
New Revision: 1824

Modified:
   trunk/code/qcommon/vm_x86_64_assembler.c
Log:
Fix compiler warnings (#4887)


Modified: trunk/code/qcommon/vm_x86_64_assembler.c
===================================================================
--- trunk/code/qcommon/vm_x86_64_assembler.c	2011-01-27 07:30:21 UTC (rev 1823)
+++ trunk/code/qcommon/vm_x86_64_assembler.c	2011-01-27 11:13:39 UTC (rev 1824)
@@ -20,6 +20,9 @@
 ===========================================================================
 */
 
+#define _ISOC99_SOURCE
+
+#include "vm_local.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -238,9 +241,15 @@
 {
 	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;



More information about the quake3-commits mailing list