IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 25, 2006, 6:34:28 PM (20 years ago)
Author:
jhoblitt
Message:

add gcc format attributes to:

psAbort()
psErrorStackPrint()
p_psError()
p_psWarning()
psLogMsg()
p_psTrace()

add PS_ASSERT_LONG_LARGER_THAN_OR_EQUAL
add PS_ASSERT_S64_WITHIN_RANGE
fix PS_ASSERT_LONG_WITHIN_RANGE
fix a wide range of format related issues:

  • missing format field specifiers
  • missing format args
  • incorrect format field specifiers
  • constants declared with the wrong type (float vs. int)
  • PS_ASSERT* for the wrong type
  • attemps to print structs with *printf()
  • unportable format specifiers, eg. long vs. long long
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/math/psBinaryOp.c

    r8232 r8627  
    3030 *  @author Robert DeSonia, MHPCC
    3131 *
    32  *  @version $Revision: 1.9 $ $Name: not supported by cvs2svn $
    33  *  @date $Date: 2006-08-08 23:32:23 $
     32 *  @version $Revision: 1.10 $ $Name: not supported by cvs2svn $
     33 *  @date $Date: 2006-08-26 04:34:28 $
    3434 *
    3535 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    107107    long n2 = ((psVector*)IN2)->n; \
    108108    if (n1 != n2) { \
    109         psError(PS_ERR_BAD_PARAMETER_SIZE, true, _("Number of elements inconsistent, %d vs %d.  Number of elements must match."), n1, n2); \
     109        psError(PS_ERR_BAD_PARAMETER_SIZE, true, _("Number of elements inconsistent, %ld vs %ld.  Number of elements must match."), n1, n2); \
    110110        if (OUT != IN1 && OUT != IN2) { \
    111111            psFree(OUT); \
     
    129129    if (((psVector*)IN1)->type.dimen == PS_DIMEN_VECTOR) { /* Regular vectors */ \
    130130        if (n1 != numRows2) { \
    131             psError(PS_ERR_BAD_PARAMETER_SIZE, true, _("Number of elements inconsistent, %d vs %d.  Number of elements must match."), n1, numRows2); \
     131            psError(PS_ERR_BAD_PARAMETER_SIZE, true, _("Number of elements inconsistent, %ld vs %ld.  Number of elements must match."), n1, numRows2); \
    132132            if (OUT != IN1 && OUT != IN2) { \
    133133                psFree(OUT); \
     
    146146    } else {  /* Transposed vectors */ \
    147147        if (n1 != numCols2) { \
    148             psError(PS_ERR_BAD_PARAMETER_SIZE, true, _("Number of elements inconsistent, %d vs %d.  Number of elements must match."), n1, numCols2); \
     148            psError(PS_ERR_BAD_PARAMETER_SIZE, true, _("Number of elements inconsistent, %ld vs %ld.  Number of elements must match."), n1, numCols2); \
    149149            if (OUT != IN1 && OUT != IN2) { \
    150150                psFree(OUT); \
     
    187187    if (((psVector*)IN2)->type.dimen == PS_DIMEN_VECTOR) { /* Regular vectors */ \
    188188        if (n2 != numRows1) { \
    189             psError(PS_ERR_BAD_PARAMETER_SIZE, true, _("Number of elements inconsistent, %d vs %d.  Number of elements must match."), n2, numRows1); \
     189            psError(PS_ERR_BAD_PARAMETER_SIZE, true, _("Number of elements inconsistent, %ld vs %ld.  Number of elements must match."), n2, numRows1); \
    190190            if (OUT != IN1 && OUT != IN2) { \
    191191                psFree(OUT); \
     
    204204    } else {  /* Transposed vectors */ \
    205205        if (n2 != numCols1) { \
    206             psError(PS_ERR_BAD_PARAMETER_SIZE, true, _("Number of elements inconsistent, %d vs %d.  Number of elements must match."), n2, numCols1); \
     206            psError(PS_ERR_BAD_PARAMETER_SIZE, true, _("Number of elements inconsistent, %ld vs %ld.  Number of elements must match."), n2, numCols1); \
    207207            if (OUT != IN1) { \
    208208                psFree(OUT); \
     
    229229    long numCols2 = ((psImage*)IN2)->numCols; \
    230230    if (numRows1 != numRows2 || numCols1 != numCols2) { \
    231         psError(PS_ERR_BAD_PARAMETER_SIZE, true, _("Specified psImage dimensions differed, %dx%d vs %dx%d."), \
     231        psError(PS_ERR_BAD_PARAMETER_SIZE, true, _("Specified psImage dimensions differed, %ldx%ld vs %ldx%ld."), \
    232232                numCols1, numRows1, numCols2, numRows2); \
    233233        if (OUT != IN1 && OUT != IN2) { \
     
    360360    } else {                                                                                                 \
    361361        psError(PS_ERR_BAD_PARAMETER_VALUE, true,                                                            \
    362                 "Types (%x,%x) are not appropriate for logical OR.\n", IN1->type, IN2->type);                \
     362                "Types (%x,%x) are not appropriate for logical OR.\n", IN1->type, IN2->type);               \
    363363        return NULL;                                                                                         \
    364364    }                                                                                                        \
Note: See TracChangeset for help on using the changeset viewer.