Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/netsmb The implementation of the try/catch functionality...



details:   https://anonhg.NetBSD.org/src/rev/a8c4c021eebd
branches:  trunk
changeset: 544229:a8c4c021eebd
user:      kristerw <kristerw%NetBSD.org@localhost>
date:      Sat Mar 15 02:54:24 2003 +0000

description:
The implementation of the try/catch functionality uses two gcc extensions
that our lint does not understand.

One of these extensions (local labels) is needed only when using multiple
try/catch blocks within a function, and the comment before these macros
say that they should be used only once per function so that the implementaton
may be portable.

The other extension (taking the address of a label) is not needed at all.

Remove the use of the extensions.

diffstat:

 sys/netsmb/smb_subr.h |  8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)

diffs (33 lines):

diff -r 99df5454db7a -r a8c4c021eebd sys/netsmb/smb_subr.h
--- a/sys/netsmb/smb_subr.h     Sat Mar 15 02:27:18 2003 +0000
+++ b/sys/netsmb/smb_subr.h     Sat Mar 15 02:54:24 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: smb_subr.h,v 1.8 2003/03/03 21:16:02 jdolecek Exp $    */
+/*     $NetBSD: smb_subr.h,v 1.9 2003/03/15 02:54:24 kristerw Exp $    */
 
 /*
  * Copyright (c) 2000-2001, Boris Popov
@@ -93,22 +93,18 @@
  * function, but we'll avoid it to maintain portability.
  */
 #define itry           {                                               \
-                               __label__ _finlab, _catchlab;           \
                                int _tval;                              \
 
 #define icatch(var)                                                    \
                                goto _finlab;                           \
-                               (void)&&_catchlab;                      \
                                _catchlab:                              \
                                var = _tval;
 
-#define ifinally               (void)&&_finlab;                        \
-                               _finlab:                                
+#define ifinally               _finlab:
 #define iendtry                }
 
 #define inocatch                                                       \
                                goto _finlab;                           \
-                               (void)&&_catchlab;                      \
                                _catchlab:                              \
 
 #define ithrow(t)      do {                                            \



Home | Main Index | Thread Index | Old Index