[dovecot-cvs] dovecot/src/lib-imap imap-parser.c, 1.52, 1.53 imap-parser.h, 1.22, 1.23
tss at dovecot.org
tss at dovecot.org
Sat Nov 18 14:06:37 UTC 2006
Update of /var/lib/cvs/dovecot/src/lib-imap
In directory talvi:/tmp/cvs-serv25815/lib-imap
Modified Files:
imap-parser.c imap-parser.h
Log Message:
Added some noreturn attributes and fixed warnings caused by them.
Index: imap-parser.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-imap/imap-parser.c,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -d -r1.52 -r1.53
--- imap-parser.c 14 Jan 2006 18:47:34 -0000 1.52
+++ imap-parser.c 18 Nov 2006 14:06:35 -0000 1.53
@@ -654,17 +654,23 @@
char *_imap_arg_str_error(const struct imap_arg *arg)
{
i_panic("Tried to access imap_arg type %d as string", arg->type);
+#ifndef __attrs_used__
return NULL;
+#endif
}
uoff_t _imap_arg_literal_size_error(const struct imap_arg *arg)
{
i_panic("Tried to access imap_arg type %d as literal size", arg->type);
+#ifndef __attrs_used__
return 0;
+#endif
}
struct imap_arg_list *_imap_arg_list_error(const struct imap_arg *arg)
{
i_panic("Tried to access imap_arg type %d as list", arg->type);
+#ifndef __attrs_used__
return NULL;
+#endif
}
Index: imap-parser.h
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-imap/imap-parser.h,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- imap-parser.h 14 Jan 2006 18:47:34 -0000 1.22
+++ imap-parser.h 18 Nov 2006 14:06:35 -0000 1.23
@@ -121,8 +121,10 @@
const char *imap_arg_string(struct imap_arg *arg);
/* Error functions */
-char *_imap_arg_str_error(const struct imap_arg *arg);
-uoff_t _imap_arg_literal_size_error(const struct imap_arg *arg);
-struct imap_arg_list *_imap_arg_list_error(const struct imap_arg *arg);
+char *_imap_arg_str_error(const struct imap_arg *arg) __attr_noreturn__;
+uoff_t _imap_arg_literal_size_error(const struct imap_arg *arg)
+ __attr_noreturn__;
+struct imap_arg_list *_imap_arg_list_error(const struct imap_arg *arg)
+ __attr_noreturn__;
#endif
More information about the dovecot-cvs
mailing list