IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 14452 for trunk/psLib/src/sys


Ignore:
Timestamp:
Aug 8, 2007, 3:40:08 PM (19 years ago)
Author:
jhoblitt
Message:

gcc attribute cleanup

Location:
trunk/psLib/src/sys
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/sys/psAbort.h

    r11686 r14452  
    1010 *  @author Joshua Hoblitt, University of Hawaii
    1111 *
    12  *  $Revision: 1.14 $ $Name: not supported by cvs2svn $
    13  *  $Date: 2007-02-07 23:52:54 $
     12 *  $Revision: 1.15 $ $Name: not supported by cvs2svn $
     13 *  $Date: 2007-08-09 01:40:07 $
    1414 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
    1515 */
     
    2222
    2323#include <stdarg.h>
     24
     25#include "psType.h"
    2426
    2527/** Reports an abort message to logging facility
     
    4547    const char *format,                 ///< A printf style formatting statement
    4648    ...
    47 #ifdef __GNUC__
    48 ) __attribute__((format(printf, 4, 5), noreturn));
    49 #else // ifdef __GNUC__
    50 );
    51 #endif // ifdef __GNUC__
     49) PS_ATTR_FORMAT(printf, 4, 5) PS_ATTR_NORETURN;
    5250#ifndef SWIG
    5351#define psAbort(...) \
  • trunk/psLib/src/sys/psError.h

    r11694 r14452  
    1212 *  @author Joshua Hoblitt, University of Hawaii
    1313 *
    14  *  @version $Revision: 1.35 $ $Name: not supported by cvs2svn $
    15  *  @date $Date: 2007-02-08 01:59:28 $
     14 *  @version $Revision: 1.36 $ $Name: not supported by cvs2svn $
     15 *  @date $Date: 2007-08-09 01:40:07 $
    1616 *
    1717 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    2828#include<stdarg.h>
    2929
     30#include "psType.h"
    3031#include "psErrorCodes.h"
    3132
     
    101102    const char* format,                ///< printf-style format of header line
    102103    ...                                ///< any parameters required in format
    103 #ifdef __GNUC__
    104 ) __attribute__((format(printf, 2, 3)));
    105 #else // ifdef __GNUC__
    106 );
    107 #endif // ifdef __GNUC__
    108 
     104) PS_ATTR_FORMAT(printf, 2, 3);
    109105
    110106#ifndef SWIG
     
    151147    const char* format,                ///< printf-style format of header line
    152148    ...                                ///< any parameters required in format
    153 #ifdef __GNUC__
    154 ) __attribute__((format(printf, 6, 7)));
    155 #else // ifdef __GNUC__
    156 );
    157 #endif // ifdef __GNUC__
     149) PS_ATTR_FORMAT(printf, 6, 7);
    158150#ifndef SWIG
    159151#define psError(code,new,...) \
     
    182174    const char* format,                ///< printf-style format of header line
    183175    ...                                ///< any parameters required in format
    184 #ifdef __GNUC__
    185 ) __attribute__((format(printf, 4, 5)));
    186 #else // ifdef __GNUC__
    187 );
    188 #endif // ifdef __GNUC__
     176) PS_ATTR_FORMAT(printf, 4, 5);
    189177#ifndef SWIG
    190178#define psWarning(...) \
     
    204192    psErrorCode code,                  ///< Error class code
    205193    const char* msg                    ///< Error message
    206 );
     194) PS_ATTR_MALLOC;
    207195
    208196/// @}
  • trunk/psLib/src/sys/psLine.h

    r11694 r14452  
    99 *  @author David Robbins, MHPCC
    1010 *
    11  *  @version $Revision: 1.7 $ $Name: not supported by cvs2svn $
    12  *  @date $Date: 2007-02-08 01:59:28 $
     11 *  @version $Revision: 1.8 $ $Name: not supported by cvs2svn $
     12 *  @date $Date: 2007-08-09 01:40:07 $
    1313 *
    1414 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    3737psLine *psLineAlloc(
    3838    long Nline                         ///< length of line object to allocate
    39 );
     39) PS_ATTR_MALLOC;
    4040
    4141
     
    7474    const char *format,                ///< printf-style format of line
    7575    ...                                ///< any parameters required in format
    76 #ifdef __GNUC__
    77 ) __attribute__((format(printf, 2, 3)));
    78 #else // ifdef __GNUC__
    79 );
    80 #endif // ifdef __GNUC__
     76) PS_ATTR_FORMAT(printf, 2, 3);
    8177
    8278
  • trunk/psLib/src/sys/psLogMsg.h

    r11694 r14452  
    1111 *  @author Joshua Hoblitt, University of Hawaii
    1212 *
    13  *  @version $Revision: 1.39 $ $Name: not supported by cvs2svn $
    14  *  @date $Date: 2007-02-08 01:59:28 $
     13 *  @version $Revision: 1.40 $ $Name: not supported by cvs2svn $
     14 *  @date $Date: 2007-08-09 01:40:07 $
    1515 *
    1616 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    120120    const char *format,                ///< printf-style format command
    121121    ...
    122 #ifdef __GNUC__
    123 ) __attribute__((format(printf, 3, 4)));
    124 #else // ifdef __GNUC__
    125 );
    126 #endif // ifdef __GNUC__
     122) PS_ATTR_FORMAT(printf, 3, 4);
    127123
    128124
  • trunk/psLib/src/sys/psString.h

    r12885 r14452  
    1111 * @author Joshua Hoblitt, University of Hawaii
    1212 *
    13  * @version $Revision: 1.41 $ $Name: not supported by cvs2svn $
    14  * @date $Date: 2007-04-18 19:37:08 $
     13 * @version $Revision: 1.42 $ $Name: not supported by cvs2svn $
     14 * @date $Date: 2007-08-09 01:40:07 $
    1515 *
    1616 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    2525#include <sys/types.h>
    2626#include <stdarg.h>
     27
    2728#include "psType.h"
    2829#include "psList.h"
     
    3233
    3334/** This macro returns a (static buffer containing) "file:line" */
     35const char *p_psFileLine(const char *file, int line)
    3436#ifdef __GNUC__
    35 const char *p_psFileLine(const char *file, int line) __attribute__((deprecated));
    36 #else // ifdef __GNUC__
    37 const char *p_psFileLine(const char *file, int line);
     37__attribute__((deprecated))
    3838#endif // ifdef __GNUC__
     39;
    3940#define PS_FILE_LINE p_psFileLine(__FILE__,__LINE__)
    4041
     
    5455    const char *func,                   ///< Function name of caller
    5556    size_t nChar                        ///< Size of psString to allocate.
    56 );
     57) PS_ATTR_MALLOC;
    5758#define psStringAlloc(nChar) \
    5859      p_psStringAlloc(__FILE__, __LINE__, __func__, nChar)
     
    147148    const char *format,                 ///< format to append
    148149    ...                                 ///< format arguments
    149 #ifdef __GNUC__
    150 ) __attribute__((format(printf, 5, 6)));
    151 #else // ifdef __GNUC__
    152 );
    153 #endif // ifdef __GNUC__
     150) PS_ATTR_FORMAT(printf, 5, 6);
    154151#define psStringAppend(dest, ...) \
    155152      p_psStringAppend(__FILE__, __LINE__, __func__, dest, __VA_ARGS__)
     
    205202    const char *format,                 ///< format to append
    206203    ...                                 ///< format arguments
    207 #ifdef __GNUC__
    208 ) __attribute__((format(printf, 5, 6)));
    209 # else // ifdef __GNUC__
    210 );
    211 #endif // ifdef __GNUC__
     204) PS_ATTR_FORMAT(printf, 5, 6);
    212205#define psStringPrepend(dest, ...) \
    213206      p_psStringPrepend(__FILE__, __LINE__, __func__, dest, __VA_ARGS__)
  • trunk/psLib/src/sys/psTrace.h

    r12494 r14452  
    99 *  @author GLG, MHPCC
    1010 *
    11  *  @version $Revision: 1.58 $ $Name: not supported by cvs2svn $
    12  *  @date $Date: 2007-03-19 22:26:22 $
     11 *  @version $Revision: 1.59 $ $Name: not supported by cvs2svn $
     12 *  @date $Date: 2007-08-09 01:40:07 $
    1313 *
    1414 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    100100    const char *format,                ///< printf-style format command
    101101    ...                                ///< trace message arguments
    102 #ifdef __GNUC__
    103 ) __attribute__((format(printf, 6, 7)));
    104 #else // ifdef __GNUC__
    105 );
    106 #endif // ifdef __GNUC__
     102) PS_ATTR_FORMAT(printf, 6, 7);
    107103#ifndef SWIG
    108104#define psTrace(facil, level, ...) \
  • trunk/psLib/src/sys/psType.h

    r12439 r14452  
    1010*  @author Ross Harman, MHPCC
    1111*
    12 *  @version $Revision: 1.59 $ $Name: not supported by cvs2svn $
    13 *  @date $Date: 2007-03-14 04:08:13 $
     12*  @version $Revision: 1.60 $ $Name: not supported by cvs2svn $
     13*  @date $Date: 2007-08-09 01:40:07 $
    1414*
    1515*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    243243#define PSELEMTYPE_SIZEOF(x) (x & 0xFF)
    244244
     245#ifdef __GNUC__
     246#define PS_ATTR_MALLOC __attribute__((__malloc__))
     247#else // __GNUC__
     248#define PS_ATTR_MALLOC
     249#endif // __GNUC__
     250
     251#ifdef __GNUC__
     252#define PS_ATTR_NORETURN __attribute__((noreturn))
     253#else // __GNUC__
     254#define PS_ATTR_NORETURN
     255#endif // __GNUC__
     256
     257#ifdef __GNUC__
     258#define PS_ATTR_FORMAT(style, start, end) __attribute__((format(style, start, end)))
     259#else // __GNUC__
     260#define PS_ATTR_FORMAT(style, start, end)
     261#endif // __GNUC__
     262
    245263/** Dimensions of a data type.
    246264 *
Note: See TracChangeset for help on using the changeset viewer.