Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37854969
en ru br
ALT Linux repos
S:2.2.11-alt3
5.0: 2.2.9-alt5
4.1: 2.2.9-alt5
4.0: 2.2.9-alt5
3.0: 2.2.9-alt3

Group :: Development/C
RPM: indent

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Patch: indent-2.2.9-alt-warnings.patch
Download


diff -upk.orig indent-2.2.9.orig/man/texinfo2man.c indent-2.2.9/man/texinfo2man.c
--- indent-2.2.9.orig/man/texinfo2man.c	2002-01-17 19:28:51 +0000
+++ indent-2.2.9/man/texinfo2man.c	2003-09-09 14:14:55 +0000
@@ -1,4 +1,5 @@
 #include <stdio.h>
+#include <stdlib.h>
 #include <malloc.h>
 #include <string.h>
 #include <ctype.h>
@@ -162,7 +163,7 @@ int start_line[256];
 
 static char value_updated[64], value_edition[64], value_version[64];
 
-process_texi (FILE * in)
+static void process_texi (FILE * in)
 {
   char buf[1024];
   int in_block = 0;
diff -upk.orig indent-2.2.9.orig/src/comments.c indent-2.2.9/src/comments.c
--- indent-2.2.9.orig/src/comments.c	2002-08-04 17:08:41 +0000
+++ indent-2.2.9/src/comments.c	2003-09-09 14:15:48 +0000
@@ -18,6 +18,7 @@
 #include "indent.h"
 #include "io.h"
 #include "comments.h"
+#include "output.h"
 #include "globs.h"
 #include "parse.h"
 
diff -upk.orig indent-2.2.9.orig/src/indent.c indent-2.2.9/src/indent.c
--- indent-2.2.9.orig/src/indent.c	2002-10-28 20:00:56 +0000
+++ indent-2.2.9/src/indent.c	2003-09-09 14:14:55 +0000
@@ -373,8 +373,6 @@ static void handle_token_lparen(
    BOOLEAN        * sp_sw,
    int            * dec_ind)
 {
-    char lparen = *token;
-    
     /* Braces in initializer lists should be put on new lines. This is
      * necessary so that -gnu does not cause things like char
      * *this_is_a_string_array[] = { "foo", "this_string_does_not_fit",
@@ -2536,7 +2534,7 @@ static exit_values_ty indent_main_loop(v
          * we reach eof */
 
         BOOLEAN is_procname_definition;
-        bb_code_ty can_break;
+        bb_code_ty can_break = bb_none;
 
         if (type_code != newline)
         {
@@ -3057,7 +3055,6 @@ int main (
     int     argc,
     char ** argv)
 {
-    int i;
     char *profile_pathname = 0;
     BOOLEAN using_stdin = false;
     exit_values_ty exit_status;
diff -upk.orig indent-2.2.9.orig/src/indent.h indent-2.2.9/src/indent.h
--- indent-2.2.9.orig/src/indent.h	2002-11-10 21:02:48 +0000
+++ indent-2.2.9/src/indent.h	2003-09-09 14:14:55 +0000
@@ -96,8 +96,6 @@ extern char *cur_line;
 /* Size of the input program, not including the ' \n\0' we add at the end */
 extern unsigned long in_prog_size;
 
-/* The output file. */
-extern FILE *output;
 
 
 
diff -upk.orig indent-2.2.9.orig/src/io.c indent-2.2.9/src/io.c
--- indent-2.2.9.orig/src/io.c	2002-08-04 17:08:41 +0000
+++ indent-2.2.9/src/io.c	2003-09-09 14:14:55 +0000
@@ -451,7 +451,7 @@ file_buffer_ty * read_stdin (void)
     static file_buffer_ty stdinptr;
 
     unsigned int          size = 15 * BUFSIZ;
-    int                   ch;
+    int                   ch = EOF;
     char                * p = NULL;
 
     if (stdinptr.data != 0)
diff -upk.orig indent-2.2.9.orig/src/output.c indent-2.2.9/src/output.c
--- indent-2.2.9.orig/src/output.c	2002-12-12 17:36:49 +0000
+++ indent-2.2.9/src/output.c	2003-09-09 14:14:55 +0000
@@ -12,6 +12,8 @@
  */
 
 #include <stdio.h>
+#include <stdlib.h>
+#include <time.h>
 #include <sys/types.h>
 #include <utime.h>
 #include <sys/stat.h>
@@ -737,11 +739,11 @@ extern void dump_line (
                     
                     if (s[0] == '/' && (s[1] == '*' || s[1] == '/'))
                     {
-                        fprintf (output, "%.*s", e_lab - s, s);
+                        fprintf (output, "%.*s", (int) (e_lab - s), s);
                     }
                     else
                     {
-                        fprintf (output, "/* %.*s */", e_lab - s, s);
+                        fprintf (output, "/* %.*s */", (int) (e_lab - s), s);
                     }
                     
                     /* no need to update cur_col: the very next thing will
@@ -1206,7 +1208,7 @@ extern void close_output(
     }
 }
 
-extern inhibit_indenting(
+void inhibit_indenting(
     BOOLEAN flag)
 {
     inhibited = flag;
diff -upk.orig indent-2.2.9.orig/src/output.h indent-2.2.9/src/output.h
--- indent-2.2.9.orig/src/output.h	2002-08-04 17:08:41 +0000
+++ indent-2.2.9/src/output.h	2003-09-09 14:14:55 +0000
@@ -47,7 +47,7 @@ extern void close_output(
     struct stat * file_stats,
      const char  * filename);
 
-extern inhibit_indenting(
+extern void inhibit_indenting(
     BOOLEAN flag);
 
 
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin