Commit 33df6451 authored by Owen Taylor's avatar Owen Taylor Committed by Owen Taylor

Fix a couple of trivial bugs that were causing warnings.

Mon Aug 21 14:46:23 2000  Owen Taylor  <otaylor@redhat.com>

	* tests/gio-test.c: Fix a couple of trivial bugs that
	were causing warnings.

Mon Aug 21 14:39:36 2000  Owen Taylor  <otaylor@redhat.com>

	* glib.h: Use C99 varargs macros where possible
	(check __STDC_VERSION__), otherwise, on gcc, use an alternate
	form of gcc varargs which is more likely
	to be supported going forward. (Based on some code
	from Raja Harinath)
parent 4010a5ac
Mon Aug 21 14:46:23 2000 Owen Taylor <otaylor@redhat.com>
* tests/gio-test.c: Fix a couple of trivial bugs that
were causing warnings.
Mon Aug 21 14:39:36 2000 Owen Taylor <otaylor@redhat.com>
* glib.h: Use C99 varargs macros where possible
(check __STDC_VERSION__), otherwise, on gcc, use an alternate
form of gcc varargs which is more likely
to be supported going forward. (Based on some code
from Raja Harinath)
2000-08-17 Darin Adler <darin@eazel.com> 2000-08-17 Darin Adler <darin@eazel.com>
* glib.h: * glib.h:
......
Mon Aug 21 14:46:23 2000 Owen Taylor <otaylor@redhat.com>
* tests/gio-test.c: Fix a couple of trivial bugs that
were causing warnings.
Mon Aug 21 14:39:36 2000 Owen Taylor <otaylor@redhat.com>
* glib.h: Use C99 varargs macros where possible
(check __STDC_VERSION__), otherwise, on gcc, use an alternate
form of gcc varargs which is more likely
to be supported going forward. (Based on some code
from Raja Harinath)
2000-08-17 Darin Adler <darin@eazel.com> 2000-08-17 Darin Adler <darin@eazel.com>
* glib.h: * glib.h:
......
Mon Aug 21 14:46:23 2000 Owen Taylor <otaylor@redhat.com>
* tests/gio-test.c: Fix a couple of trivial bugs that
were causing warnings.
Mon Aug 21 14:39:36 2000 Owen Taylor <otaylor@redhat.com>
* glib.h: Use C99 varargs macros where possible
(check __STDC_VERSION__), otherwise, on gcc, use an alternate
form of gcc varargs which is more likely
to be supported going forward. (Based on some code
from Raja Harinath)
2000-08-17 Darin Adler <darin@eazel.com> 2000-08-17 Darin Adler <darin@eazel.com>
* glib.h: * glib.h:
......
Mon Aug 21 14:46:23 2000 Owen Taylor <otaylor@redhat.com>
* tests/gio-test.c: Fix a couple of trivial bugs that
were causing warnings.
Mon Aug 21 14:39:36 2000 Owen Taylor <otaylor@redhat.com>
* glib.h: Use C99 varargs macros where possible
(check __STDC_VERSION__), otherwise, on gcc, use an alternate
form of gcc varargs which is more likely
to be supported going forward. (Based on some code
from Raja Harinath)
2000-08-17 Darin Adler <darin@eazel.com> 2000-08-17 Darin Adler <darin@eazel.com>
* glib.h: * glib.h:
......
Mon Aug 21 14:46:23 2000 Owen Taylor <otaylor@redhat.com>
* tests/gio-test.c: Fix a couple of trivial bugs that
were causing warnings.
Mon Aug 21 14:39:36 2000 Owen Taylor <otaylor@redhat.com>
* glib.h: Use C99 varargs macros where possible
(check __STDC_VERSION__), otherwise, on gcc, use an alternate
form of gcc varargs which is more likely
to be supported going forward. (Based on some code
from Raja Harinath)
2000-08-17 Darin Adler <darin@eazel.com> 2000-08-17 Darin Adler <darin@eazel.com>
* glib.h: * glib.h:
......
Mon Aug 21 14:46:23 2000 Owen Taylor <otaylor@redhat.com>
* tests/gio-test.c: Fix a couple of trivial bugs that
were causing warnings.
Mon Aug 21 14:39:36 2000 Owen Taylor <otaylor@redhat.com>
* glib.h: Use C99 varargs macros where possible
(check __STDC_VERSION__), otherwise, on gcc, use an alternate
form of gcc varargs which is more likely
to be supported going forward. (Based on some code
from Raja Harinath)
2000-08-17 Darin Adler <darin@eazel.com> 2000-08-17 Darin Adler <darin@eazel.com>
* glib.h: * glib.h:
......
Mon Aug 21 14:46:23 2000 Owen Taylor <otaylor@redhat.com>
* tests/gio-test.c: Fix a couple of trivial bugs that
were causing warnings.
Mon Aug 21 14:39:36 2000 Owen Taylor <otaylor@redhat.com>
* glib.h: Use C99 varargs macros where possible
(check __STDC_VERSION__), otherwise, on gcc, use an alternate
form of gcc varargs which is more likely
to be supported going forward. (Based on some code
from Raja Harinath)
2000-08-17 Darin Adler <darin@eazel.com> 2000-08-17 Darin Adler <darin@eazel.com>
* glib.h: * glib.h:
......
Mon Aug 21 14:46:23 2000 Owen Taylor <otaylor@redhat.com>
* tests/gio-test.c: Fix a couple of trivial bugs that
were causing warnings.
Mon Aug 21 14:39:36 2000 Owen Taylor <otaylor@redhat.com>
* glib.h: Use C99 varargs macros where possible
(check __STDC_VERSION__), otherwise, on gcc, use an alternate
form of gcc varargs which is more likely
to be supported going forward. (Based on some code
from Raja Harinath)
2000-08-17 Darin Adler <darin@eazel.com> 2000-08-17 Darin Adler <darin@eazel.com>
* glib.h: * glib.h:
......
...@@ -1470,19 +1470,32 @@ GLogLevelFlags g_log_set_always_fatal (GLogLevelFlags fatal_mask); ...@@ -1470,19 +1470,32 @@ GLogLevelFlags g_log_set_always_fatal (GLogLevelFlags fatal_mask);
#ifndef G_LOG_DOMAIN #ifndef G_LOG_DOMAIN
#define G_LOG_DOMAIN ((gchar*) 0) #define G_LOG_DOMAIN ((gchar*) 0)
#endif /* G_LOG_DOMAIN */ #endif /* G_LOG_DOMAIN */
#ifdef __GNUC__ #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
#define g_error(format, args...) g_log (G_LOG_DOMAIN, \ #define g_error(...) g_log (G_LOG_DOMAIN, \
G_LOG_LEVEL_ERROR, \ G_LOG_LEVEL_ERROR, \
format, ##args) __VA_ARGS__)
#define g_message(format, args...) g_log (G_LOG_DOMAIN, \ #define g_message(...) g_log (G_LOG_DOMAIN, \
G_LOG_LEVEL_MESSAGE, \ G_LOG_LEVEL_MESSAGE, \
format, ##args) __VA_ARGS__)
#define g_critical(format, args...) g_log (G_LOG_DOMAIN, \ #define g_critical(...) g_log (G_LOG_DOMAIN, \
G_LOG_LEVEL_CRITICAL, \ G_LOG_LEVEL_CRITICAL, \
format, ##args) __VA_ARGS__)
#define g_warning(format, args...) g_log (G_LOG_DOMAIN, \ #define g_warning(...) g_log (G_LOG_DOMAIN, \
G_LOG_LEVEL_WARNING, \ G_LOG_LEVEL_WARNING, \
format, ##args) __VA_ARGS__)
#elif defined (__GNUC__)
#define g_error(format...) g_log (G_LOG_DOMAIN, \
G_LOG_LEVEL_ERROR, \
format)
#define g_message(format...) g_log (G_LOG_DOMAIN, \
G_LOG_LEVEL_MESSAGE, \
format)
#define g_critical(format...) g_log (G_LOG_DOMAIN, \
G_LOG_LEVEL_CRITICAL, \
format)
#define g_warning(format...) g_log (G_LOG_DOMAIN, \
G_LOG_LEVEL_WARNING, \
format)
#else /* !__GNUC__ */ #else /* !__GNUC__ */
static void static void
g_error (const gchar *format, g_error (const gchar *format,
......
...@@ -1470,19 +1470,32 @@ GLogLevelFlags g_log_set_always_fatal (GLogLevelFlags fatal_mask); ...@@ -1470,19 +1470,32 @@ GLogLevelFlags g_log_set_always_fatal (GLogLevelFlags fatal_mask);
#ifndef G_LOG_DOMAIN #ifndef G_LOG_DOMAIN
#define G_LOG_DOMAIN ((gchar*) 0) #define G_LOG_DOMAIN ((gchar*) 0)
#endif /* G_LOG_DOMAIN */ #endif /* G_LOG_DOMAIN */
#ifdef __GNUC__ #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
#define g_error(format, args...) g_log (G_LOG_DOMAIN, \ #define g_error(...) g_log (G_LOG_DOMAIN, \
G_LOG_LEVEL_ERROR, \ G_LOG_LEVEL_ERROR, \
format, ##args) __VA_ARGS__)
#define g_message(format, args...) g_log (G_LOG_DOMAIN, \ #define g_message(...) g_log (G_LOG_DOMAIN, \
G_LOG_LEVEL_MESSAGE, \ G_LOG_LEVEL_MESSAGE, \
format, ##args) __VA_ARGS__)
#define g_critical(format, args...) g_log (G_LOG_DOMAIN, \ #define g_critical(...) g_log (G_LOG_DOMAIN, \
G_LOG_LEVEL_CRITICAL, \ G_LOG_LEVEL_CRITICAL, \
format, ##args) __VA_ARGS__)
#define g_warning(format, args...) g_log (G_LOG_DOMAIN, \ #define g_warning(...) g_log (G_LOG_DOMAIN, \
G_LOG_LEVEL_WARNING, \ G_LOG_LEVEL_WARNING, \
format, ##args) __VA_ARGS__)
#elif defined (__GNUC__)
#define g_error(format...) g_log (G_LOG_DOMAIN, \
G_LOG_LEVEL_ERROR, \
format)
#define g_message(format...) g_log (G_LOG_DOMAIN, \
G_LOG_LEVEL_MESSAGE, \
format)
#define g_critical(format...) g_log (G_LOG_DOMAIN, \
G_LOG_LEVEL_CRITICAL, \
format)
#define g_warning(format...) g_log (G_LOG_DOMAIN, \
G_LOG_LEVEL_WARNING, \
format)
#else /* !__GNUC__ */ #else /* !__GNUC__ */
static void static void
g_error (const gchar *format, g_error (const gchar *format,
......
...@@ -63,7 +63,7 @@ read_all (int fd, ...@@ -63,7 +63,7 @@ read_all (int fd,
{ {
guint left = nbytes; guint left = nbytes;
guint nb; guint nb;
GIOError error; GIOError error = G_IO_ERROR_NONE;
char *bufp = buffer; char *bufp = buffer;
/* g_io_channel_read() doesn't necessarily return all the /* g_io_channel_read() doesn't necessarily return all the
...@@ -150,7 +150,7 @@ recv_message (GIOChannel *channel, ...@@ -150,7 +150,7 @@ recv_message (GIOChannel *channel,
if (seq != seqtab[i].seq) if (seq != seqtab[i].seq)
{ {
g_print ("gio-test: ...from %d: invalid sequence number %d, expected %d\n", g_print ("gio-test: ...from %d: invalid sequence number %d, expected %d\n",
seq, seqtab[i].seq); fd, seq, seqtab[i].seq);
g_assert_not_reached (); g_assert_not_reached ();
} }
seqtab[i].seq++; seqtab[i].seq++;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment