Build fixes

This commit is contained in:
Evan Miller 2024-12-26 06:33:37 -05:00
parent 4c4ff13237
commit 7625bfaebf
3 changed files with 7 additions and 7 deletions

View File

@ -83,7 +83,7 @@ AM_CONDITIONAL(SQL, test x$sql = xtrue)
AC_SUBST(SQL)
AC_SUBST(LFLAGS)
CFLAGS="$CFLAGS -Wall -Werror"
CFLAGS="$CFLAGS -Wall"
LOCALE_T=locale_t
AS_CASE([$host],
[*mingw*], [LDFLAGS="$LDFLAGS -no-undefined" CFLAGS="$CFLAGS -D_spawnv=spawnv"], [])

View File

@ -2058,7 +2058,7 @@ static int _odbc_fix_literals(struct _hstmt *stmt)
char tmp[4096];
char *s, *d, *p;
int i, quoted = 0, find_end = 0;
char quote_char;
char quote_char = '\0';
s=stmt->query;
d=tmp;

View File

@ -322,7 +322,7 @@ main(int argc, char **argv)
char prompt[20];
int line = 0;
char *mybuf;
unsigned int bufsz;
size_t bufsz;
MdbSQL *sql;
FILE *in = NULL, *out = NULL;
char *filename_in=NULL, *filename_out=NULL;
@ -408,7 +408,7 @@ main(int argc, char **argv)
/* give the buffer an initial size */
bufsz = 4096;
mybuf = g_malloc(bufsz);
mybuf = malloc(bufsz);
mybuf[0]='\0';
while (1) {
@ -420,7 +420,7 @@ main(int argc, char **argv)
if (in) {
s=calloc(bufsz, 1);
if (!fgets(s, bufsz, in)) {
if (!fgets(s, (int)bufsz, in)) {
// Backwards compatibility with older MDBTools
// Files read from the command line had an
// implicit "go" at the end
@ -478,7 +478,7 @@ main(int argc, char **argv)
while (strlen(mybuf) + strlen(s) > bufsz) {
bufsz *= 2;
mybuf = (char *) g_realloc(mybuf, bufsz);
mybuf = realloc(mybuf, bufsz);
}
#ifdef HAVE_READLINE_HISTORY
/* don't record blank lines, or lines read from files
@ -500,7 +500,7 @@ main(int argc, char **argv)
}
mdb_sql_exit(sql);
g_free(mybuf);
free(mybuf);
if (s) free(s);
if (out) fclose(out);
if ((in) && (in != stdin)) fclose(in);