* fixed several compiler warnings.
authorWilfried Göesgens <willi@citadel.org>
Sun, 20 Apr 2008 19:23:25 +0000 (19:23 +0000)
committerWilfried Göesgens <willi@citadel.org>
Sun, 20 Apr 2008 19:23:25 +0000 (19:23 +0000)
citadel/modules/extnotify/extnotify.h
citadel/modules/extnotify/extnotify_main.c
citadel/modules/rssclient/serv_rssclient.c
citadel/modules/vcard/serv_vcard.c

index e25650eb028d5d7dd10d99047d009ee4de450591..5cecb46e2e701e4a8f4bd6d9e7f666a18d1fc0d3 100644 (file)
@@ -17,7 +17,7 @@ extern "C" {
 
 int notify_funambol_server(char *user);
 
-char *extNotify_getPrefs(long configMsgNum, char *configMsg);
+void extNotify_getPrefs(long configMsgNum, char *configMsg);
 long extNotify_getConfigMessage(char *username);
 void process_notify(long msgnum, void *usrdata);
 
index fb6823da416543403b21dc2662656c18fc76a091..06c6699c6af0701ad1c76228d6037d9c1f198927 100644 (file)
@@ -115,7 +115,7 @@ void process_notify(long msgnum, void *usrdata) {
     long configMsgNum = extNotify_getConfigMessage(msg->cm_fields['W']);
     char configMsg[SIZ];
     
-    extNotify_getPrefs(configMsgNum, &configMsg);
+    extNotify_getPrefs(configMsgNum, &configMsg[0]);
     
     /* Check to see if:
      * 1. The user has configured paging / They have and disabled it
@@ -123,8 +123,10 @@ void process_notify(long msgnum, void *usrdata) {
      * 3. A Funambol server has been entered
      *
      */
-    if ((configMsgNum == -1) || (strncasecmp(configMsg, "none", 4) == 0) &&
-    IsEmptyStr(config.c_pager_program) && IsEmptyStr(config.c_funambol_host)) {
+    if ((configMsgNum == -1) || 
+       ((strncasecmp(configMsg, "none", 4) == 0) &&
+        IsEmptyStr(config.c_pager_program) && 
+        IsEmptyStr(config.c_funambol_host))) {
         CtdlLogPrintf(CTDL_DEBUG, "No external notifiers configured on system/user");
         goto nuke;
     }
@@ -152,18 +154,17 @@ void process_notify(long msgnum, void *usrdata) {
 /*! \brief Checks to see what notification option the user has set
  *
  */
-char *extNotify_getPrefs(long configMsgNum, char *configMsg) {
+void extNotify_getPrefs(long configMsgNum, char *configMsg) {
     // Do a simple string search to see if 'funambol' is selected as the
     // type. This string would be at the very top of the message contents.
     if (configMsgNum == -1) {
         CtdlLogPrintf(CTDL_ERR, "extNotify_isAllowedByPrefs was passed a non-existant config message id\n");
-        return "none";
+        return;
     }
     struct CtdlMessage *prefMsg;
     prefMsg = CtdlFetchMessage(configMsgNum, 1);
     strncpy(configMsg, prefMsg->cm_fields['M'], strlen(prefMsg->cm_fields['M']));
     CtdlFreeMessage(prefMsg);
-    return configMsg;
 }
 /*! \brief Get configuration message for pager/funambol system from the
  *                     users "My Citadel Config" room
index 605b0772d70524977cae7784f783954ecf8784ea..e97a59dcb8f391f025c6f50f2517dc1b288151aa 100644 (file)
@@ -97,10 +97,10 @@ void rss_save_item(struct rss_item *ri) {
        else {
                MD5Init(&md5context);
                if (ri->title != NULL) {
-                       MD5Update(&md5context, ri->title, strlen(ri->title));
+                       MD5Update(&md5context, (unsigned char*)ri->title, strlen(ri->title));
                }
                if (ri->link != NULL) {
-                       MD5Update(&md5context, ri->link, strlen(ri->link));
+                       MD5Update(&md5context, (unsigned char*)ri->link, strlen(ri->link));
                }
                MD5Final(rawdigest, &md5context);
                for (i=0; i<MD5_DIGEST_LEN; i++) {
index d7f3c8af681b13e082e8c20ffc5758747eafa4b2..7180cd668229ebb623a37b71dd5667fbb5cd429b 100644 (file)
@@ -991,7 +991,7 @@ void vcard_newuser(struct ctdluser *usbuf) {
        /* If using host auth mode, we add an email address based on the login */
        if (config.c_auth_mode == AUTHMODE_HOST) {
                struct passwd pwd;
-               struct passwd **result;
+               struct passwd **result = NULL;
                char pwd_buffer[SIZ];
 
                if (getpwuid_r(usbuf->uid, &pwd, pwd_buffer, sizeof pwd_buffer, result) == 0) {