]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - util.c
Make it compile with g++ again
[xonotic/gmqcc.git] / util.c
diff --git a/util.c b/util.c
index c6c89253f4b501f20b2fbb4149bf6b1813a0332b..ca8f2e87ae5d49213400bf13021118a12ba7be59 100644 (file)
--- a/util.c
+++ b/util.c
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  * SOFTWARE.
  */
-#include <stdarg.h>
-#include <errno.h>
+#include <string.h>
+#include <ctype.h>
+#include <stdlib.h>
+
 #include "gmqcc.h"
 
 void util_debug(const char *area, const char *ms, ...) {
@@ -319,7 +321,7 @@ int util_asprintf(char **ret, const char *fmt, ...) {
 
         allocated = (char*)mem_a(4096); /* A page must be enough */
         strerror_s(allocated, 4096, num);
-    
+
         vec_push(vector, allocated);
         return (const char *)allocated;
     }
@@ -388,7 +390,7 @@ int util_asprintf(char **ret, const char *fmt, ...) {
 static uint32_t mt_state[MT_SIZE];
 static size_t   mt_index = 0;
 
-static GMQCC_INLINE void mt_generate() {
+static GMQCC_INLINE void mt_generate(void) {
     /*
      * The loop has been unrolled here: the original paper and implemenation
      * Called for the following code: