diff options
author | David Robillard <d@drobilla.net> | 2012-04-06 20:00:50 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2012-04-06 20:00:50 +0000 |
commit | d69e1fb5c865b09d134eb671a626165a019908d9 (patch) | |
tree | 0babdc331c4ee9967aba8d681e8425c10f57d00f /src/sratom.c | |
parent | 18de4c8cea8df4301824e92dc1708d11560a5af8 (diff) | |
download | sratom-d69e1fb5c865b09d134eb671a626165a019908d9.tar.gz sratom-d69e1fb5c865b09d134eb671a626165a019908d9.tar.bz2 sratom-d69e1fb5c865b09d134eb671a626165a019908d9.zip |
Fix compilation under MSVC.
git-svn-id: http://svn.drobilla.net/lad/trunk/sratom@4147 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/sratom.c')
-rw-r--r-- | src/sratom.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/sratom.c b/src/sratom.c index 646d462..556d4ed 100644 --- a/src/sratom.c +++ b/src/sratom.c @@ -16,6 +16,7 @@ #include <assert.h> #include <ctype.h> +#include <stdio.h> #include <stdlib.h> #include <string.h> @@ -281,7 +282,7 @@ sratom_write(Sratom* sratom, } else if (type_urid == sratom->midi_MidiEvent) { new_node = true; datatype = serd_node_from_string(SERD_URI, NS_MIDI "MidiEvent"); - uint8_t* str = calloc(size * 2 + 1, 1); + uint8_t* str = (uint8_t*)calloc(size * 2 + 1, 1); for (uint32_t i = 0; i < size; ++i) { snprintf((char*)str + (2 * i), size * 2 + 1, "%02X", (unsigned)(uint8_t)*((uint8_t*)body + i)); @@ -424,7 +425,9 @@ sratom_to_turtle(Sratom* sratom, SerdWriter* writer = serd_writer_new( SERD_TURTLE, - SERD_STYLE_ABBREVIATED|SERD_STYLE_RESOLVED|SERD_STYLE_CURIED, + (SerdStyle)(SERD_STYLE_ABBREVIATED | + SERD_STYLE_RESOLVED | + SERD_STYLE_CURIED), env, &buri, serd_chunk_sink, &str); // Write @prefix directives @@ -549,7 +552,7 @@ read_node(Sratom* sratom, } else if (language) { const char* prefix = "http://lexvo.org/id/iso639-3/"; const size_t lang_len = strlen(prefix) + strlen(language); - char* lang_uri = calloc(lang_len + 1, 1); + char* lang_uri = (char*)calloc(lang_len + 1, 1); snprintf(lang_uri, lang_len + 1, "%s%s", prefix, language); lv2_atom_forge_literal( forge, str, len, 0, |