aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mysql.cpp8
-rw-r--r--src/postgresql.cpp2
-rw-r--r--src/sqlite3.cpp8
3 files changed, 9 insertions, 9 deletions
diff --git a/src/mysql.cpp b/src/mysql.cpp
index 71ea16c..2362d60 100644
--- a/src/mysql.cpp
+++ b/src/mysql.cpp
@@ -91,7 +91,7 @@ char* MySQLConnection::ScalarString(char* sql, int row, int col) {
for (int rowIndex = 0; rowIndex <= row; rowIndex++) {
res->next();
}
- char* result = res->getString(col + 1).c_str();
+ char* result = (char*) res->getString(col + 1).c_str();
delete res;
@@ -104,13 +104,13 @@ void MySQLConnection::ToArray(mysql::ResultSet* result, csnd::Csound* csound, AR
int colNum = meta->getColumnCount();
int rowNum = result->rowsCount();
int totalResults = colNum * rowNum;
- array->sizes = csound->calloc(sizeof(int32_t) * 2);
+ array->sizes = (int32_t*) csound->calloc(sizeof(int32_t) * 2);
array->sizes[0] = rowNum;
array->sizes[1] = colNum;
array->dimensions = 2;
CS_VARIABLE *var = array->arrayType->createVariable(csound, NULL);
array->arrayMemberSize = var->memBlockSize;
- array->data = csound->calloc(var->memBlockSize * totalResults);
+ array->data = (MYFLT*) csound->calloc(var->memBlockSize * totalResults);
STRINGDAT* strings;
if (asString) {
strings = (STRINGDAT*) array->data;
@@ -123,7 +123,7 @@ void MySQLConnection::ToArray(mysql::ResultSet* result, csnd::Csound* csound, AR
colIndex = 0;
while (colIndex < colNum) {
if (asString) {
- char* item = result->getString(colIndex + 1).c_str();
+ char* item = (char*) result->getString(colIndex + 1).c_str();
strings[index].size = strlen(item) + 1;
strings[index].data = csound->strdup(item);
} else {
diff --git a/src/postgresql.cpp b/src/postgresql.cpp
index f2d42be..6b54e29 100644
--- a/src/postgresql.cpp
+++ b/src/postgresql.cpp
@@ -98,7 +98,7 @@ void PostgresConnection::ToArray(PGresult* result, csnd::Csound* csound, ARRAYDA
int rows = PQntuples(result);
int cols = PQnfields(result);
int totalResults = rows * cols;
- array->sizes = csound->calloc(sizeof(int32_t) * 2);
+ array->sizes = (int32_t*) csound->calloc(sizeof(int32_t) * 2);
array->sizes[0] = rows;
array->sizes[1] = cols;
array->dimensions = 2;
diff --git a/src/sqlite3.cpp b/src/sqlite3.cpp
index 0fd96e3..00b2773 100644
--- a/src/sqlite3.cpp
+++ b/src/sqlite3.cpp
@@ -88,7 +88,7 @@ char* SqliteConnection::ScalarString(char* sql, int row, int col) {
rc = sqlite3_finalize(stmt);
throw std::runtime_error("column number out of range");
}
- char* result = sqlite3_column_text(stmt, col);
+ char* result = (char*) sqlite3_column_text(stmt, col);
rc = sqlite3_finalize(stmt);
return result;
}
@@ -115,13 +115,13 @@ void SqliteConnection::ToArray(sqlite3_stmt* stmt, csnd::Csound* csound, ARRAYDA
int colNum = sqlite3_column_count(stmt);
int rowNum = RowCount(stmt);
int totalResults = colNum * rowNum;
- array->sizes = csound->calloc(sizeof(int32_t) * 2);
+ array->sizes = (int32_t*) csound->calloc(sizeof(int32_t) * 2);
array->sizes[0] = rowNum;
array->sizes[1] = colNum;
array->dimensions = 2;
CS_VARIABLE *var = array->arrayType->createVariable(csound, NULL);
array->arrayMemberSize = var->memBlockSize;
- array->data = csound->calloc(var->memBlockSize * totalResults);
+ array->data = (MYFLT*) csound->calloc(var->memBlockSize * totalResults);
STRINGDAT* strings;
if (asString) {
strings = (STRINGDAT*) array->data;
@@ -135,7 +135,7 @@ void SqliteConnection::ToArray(sqlite3_stmt* stmt, csnd::Csound* csound, ARRAYDA
colIndex = 0;
while (colIndex < colNum) {
if (asString) {
- char* item = sqlite3_column_text(stmt, colIndex);
+ char* item = (char*) sqlite3_column_text(stmt, colIndex);
strings[index].size = strlen(item) + 1;
strings[index].data = csound->strdup(item);
} else {