Changeset 170 for trunk/src/sh_error.c


Ignore:
Timestamp:
Apr 30, 2008, 11:56:45 PM (17 years ago)
Author:
katerina
Message:

Plenty of compiler warnings fixed, SQL query length fixed, doc update.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/sh_error.c

    r159 r170  
    105105static int sh_error_string (struct _log_t * lmsg, va_list vl);
    106106
    107 extern int  sh_log_console (/*@null@*/char *message);
     107extern int  sh_log_console (/*@null@*/const char *message);
    108108extern int  sh_log_syslog  (int  severity, /*@null@*/char *message);
    109109extern int  sh_log_file    (/*@null@*/char *message,
     
    173173
    174174static
    175 void compute_flag_err_debug()
     175void compute_flag_err_debug(void)
    176176{
    177177  if ((errFlags.loglevel & SH_ERR_ALL) != 0)
     
    197197
    198198static
    199 void compute_flag_err_info()
     199void compute_flag_err_info(void)
    200200{
    201201  if ((errFlags.loglevel & SH_ERR_INFO) != 0)
     
    220220}
    221221
    222 void sh_error_dbg_switch()
     222void sh_error_dbg_switch(void)
    223223{
    224224  if (dbg_flag == 0)
     
    466466typedef struct eef
    467467{
    468   char * str;
     468  const char * str;
    469469  int    val;
    470470} eef_struc;
     
    797797/* init or re-init log facilities that need it
    798798 */
    799 void sh_error_fixup()
     799void sh_error_fixup(void)
    800800{
    801801#if defined(HAVE_LIBPRELUDE_9)
     
    813813/* to be called from sh_prelude_reset
    814814 */
    815 void sh_error_init_prelude()
     815void sh_error_init_prelude(void)
    816816{
    817817#if defined(HAVE_LIBPRELUDE_9)
     
    865865SH_MUTEX_RECURSIVE(mutex_err_handle);
    866866
    867 void sh_error_handle (int sev, char * file, long line,
     867void sh_error_handle (int sev, const char * file, long line,
    868868                      long status, unsigned long msg_id, ...)
    869869{
     
    875875  char * fmt;
    876876
    877   int    flag_inet  = S_FALSE;
     877  int    flag_inet;
    878878
    879879#ifdef SH_WITH_SERVER
     
    974974    {
    975975      flag_inet = S_TRUE;
     976    }
     977  else
     978    {
     979      flag_inet  = S_FALSE;
    976980    }
    977981
     
    13551359          *priority = (int) msg_cat[i].priority;
    13561360          *class    = (unsigned int) msg_cat[i].class;
    1357           SL_RETURN (_(msg_cat[i].format), _("get_format"));
     1361          SL_RETURN (((char *) _(msg_cat[i].format)), _("get_format"));
    13581362        }
    13591363      ++i;
     
    15451549      /*@i@*/required = sl_vsnprintf(&(lmsg->msg[len]),
    15461550                                     (lmsg->msg_len - len), lmsg->format, vl);
     1551
    15471552      if ((required >= 0) &&
    15481553          sl_ok_adds(required, len) &&
     
    15561561          lmsg->msg_len = required + len + 4;
    15571562          (void) sl_vsnprintf(&(lmsg->msg[len]),
    1558                               (required + len + 1), lmsg->format, vl2);
     1563                              (required + 1), lmsg->format, vl2);
    15591564        }
    15601565      va_end(vl2);
Note: See TracChangeset for help on using the changeset viewer.