Procházet zdrojové kódy

* Misc compile *warnings*

svn: 1078
Bryan Drewery před 22 roky
rodič
revize
220e5a2e99
4 změnil soubory, kde provedl 13 přidání a 4 odebrání
  1. 2 0
      src/botmsg.c
  2. 1 1
      src/compat/dirname.c
  3. 8 3
      src/main.c
  4. 2 0
      src/misc.c

+ 2 - 0
src/botmsg.c

@@ -390,6 +390,8 @@ void botnet_send_reject(int idx, char *fromp, char *frombot, char *top, char *to
 inline void putallbots(char *par)
 { 
   botnet_send_zapf_broad(-1, conf.bot->nick, NULL, par);
+
+  return;
 }
 
 void putbot(char *bot, char *par)

+ 1 - 1
src/compat/dirname.c

@@ -34,7 +34,7 @@ dirname(const char *path)
                 } while (endp > path && *endp == '/');
         }
 
-        if (endp - path + 2 > sizeof(bname)) {
+        if (endp - path + 2 > (signed) sizeof(bname)) {
                 errno = ENAMETOOLONG;
                 return(NULL);
         }

+ 8 - 3
src/main.c

@@ -830,18 +830,23 @@ int main(int argc, char **argv)
     pid_t pid = do_fork();
 
     writepid(conf.bot->pid_file, pid);
+#ifdef lame
     printf("%s%s%c%s%s%s l%sA%su%sN%sc%sH%se%sD%s %s(%s%d%s)%s\n",
             RED(-1), BOLD(-1), conf.bot->nick[0], BOLD_END(-1), &conf.bot->nick[1],
             COLOR_END(-1), BOLD(-1), BOLD_END(-1), BOLD(-1), BOLD_END(-1), BOLD(-1), BOLD_END(-1),
             BOLD(-1), BOLD_END(-1), YELLOW(-1), COLOR_END(-1), pid, YELLOW(-1), COLOR_END(-1));
-  
-    printf("%s launched into the background  (pid: %d)\n\n", conf.bot->nick, pid);
+#endif
+    printf("%s[%s%s%s]%s -%s- initiated %s(%s%d%s)%s\n",
+           BOLD(-1), BOLD_END(-1), packname, BOLD(-1), BOLD_END(-1), conf.bot->nick,
+           BOLD(-1), BOLD_END(-1), BOLD(-1), BOLD_END(-1));
   } else {
 #endif /* !CYGWIN_HACKS */
 #ifdef CYGWIN_HACKS
     FreeConsole();
 #endif /* CYGWIN_HACKS */
-    printf("%s launched (not backgrounding)\n\n", conf.bot->nick);
+    printf("%s[%s%s%s]%s -%s- initiated %s(%sNot backgrounding%s)%s\n",
+           BOLD(-1), BOLD_END(-1), packname, BOLD(-1), BOLD_END(-1), conf.bot->nick,
+           BOLD(-1), BOLD_END(-1), BOLD(-1), BOLD_END(-1));
   }
 
   /* Terminal emulating dcc chat */

+ 2 - 0
src/misc.c

@@ -638,6 +638,8 @@ char *strchr_unescape(char *str, const char divc, register const char esc_char)
 inline void str_unescape(char *str, register const char esc_char)
 {
   (void) strchr_unescape(str, 0, esc_char);
+
+  return;
 }
 
 /* Kills the bot. s1 is the reason shown to other bots,