From: Florian Forster Date: Fri, 27 Feb 2009 13:09:12 +0000 (+0100) Subject: oracle plugin: Fix type size issue under 64bit systems. X-Git-Tag: collectd-4.6.2~13 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=e1e33fa276c657f0f0f91f60155a99017fbef72b;p=collectd.git oracle plugin: Fix type size issue under 64bit systems. Under 64bit systems, `ub4' is of a different size than `size_t', so that a `(size_t *)' cannot be casted to a `(ub4 *)' automatically. --- diff --git a/src/oracle.c b/src/oracle.c index 324dd4b4..78a09ffd 100644 --- a/src/oracle.c +++ b/src/oracle.c @@ -497,7 +497,7 @@ static int o_read_database_query (o_database_t *db, /* {{{ */ for (i = 0; i < column_num; i++) /* {{{ */ { char *column_name; - size_t column_name_length; + ub4 column_name_length; OCIParam *oci_param; oci_param = NULL; @@ -533,8 +533,8 @@ static int o_read_database_query (o_database_t *db, /* {{{ */ column_names[i][column_name_length] = 0; DEBUG ("oracle plugin: o_read_database_query: column_names[%zu] = %s; " - "column_name_length = %zu;", - i, column_names[i], column_name_length); + "column_name_length = %"PRIu32";", + i, column_names[i], (uint32_t) column_name_length); status = OCIDefineByPos (oci_statement, &oci_defines[i], oci_error, (ub4) (i + 1),