projects
/
yaz-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Define two locals always; to avoid GCC warning
[yaz-moved-to-github.git]
/
src
/
record_render.c
diff --git
a/src/record_render.c
b/src/record_render.c
index
1c8c06a
..
c48406c
100644
(file)
--- a/
src/record_render.c
+++ b/
src/record_render.c
@@
-34,7
+34,7
@@
static yaz_iconv_t iconv_create_charset(const char *record_charset,
yaz_iconv_t cd = 0;
char *from_set1 = 0;
char *from_set2 = 0;
yaz_iconv_t cd = 0;
char *from_set1 = 0;
char *from_set2 = 0;
- char *to_set = 0;
+ char *to_set = "utf-8";
if (record_charset && *record_charset)
{
char *cp = charset_buf;
if (record_charset && *record_charset)
{
char *cp = charset_buf;
@@
-62,11
+62,11
@@
static yaz_iconv_t iconv_create_charset(const char *record_charset,
}
if (from_set1)
}
if (from_set1)
- cd = yaz_iconv_open(to_set ? to_set : "UTF-8", from_set1);
+ cd = yaz_iconv_open(to_set, from_set1);
if (cd2)
{
if (from_set2)
if (cd2)
{
if (from_set2)
- *cd2 = yaz_iconv_open(to_set ? to_set : "UTF-8", from_set2);
+ *cd2 = yaz_iconv_open(to_set, from_set2);
else
*cd2 = 0;
}
else
*cd2 = 0;
}
@@
-465,7
+465,7
@@
const char *yaz_record_render(Z_NamePlusRecord *npr, const char *schema,
if (base64_xpath)
{
char *type_spec = nmem_malloc(nmem,
if (base64_xpath)
{
char *type_spec = nmem_malloc(nmem,
- strlen(format) + strlen(charset) + 11);
+ strlen(type) + strlen(charset) + 11);
strcpy(type_spec, type);
if (*charset)
{
strcpy(type_spec, type);
if (*charset)
{