File: fix_gcc_warnings

package info (click to toggle)
sift 4.0.3b-6
  • links: PTS, VCS
  • area: non-free
  • in suites: bookworm, bullseye, buster
  • size: 173,544 kB
  • sloc: perl: 37,171; ansic: 8,322; csh: 1,829; sh: 120; makefile: 86
file content (101 lines) | stat: -rw-r--r-- 3,548 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
Description: Fix gcc warnings.
Author: Michael Bienia <geser@ubuntu.com>
--- a/src/Alignment.c
+++ b/src/Alignment.c
@@ -766,7 +766,7 @@
 void
 read_psiblast_header_until_first_alignment (FILE* fp)
 {
-	char line[LARGE_BUFF_LENGTH];
+	char line[LINE_LEN > LARGE_BUFF_LENGTH ? LINE_LEN : LARGE_BUFF_LENGTH];
 
 	read_psiblast_header_until_first (fp);
 	
@@ -783,7 +783,7 @@
 int 
 read_psiblast_header_until_first_no_error (FILE* fp,int return_error )
 {
-        char line[MAXLEN];
+        char line[LINE_LEN];
 
         while (!feof (fp) && fgets (line, LINE_LEN, fp) != NULL &&
                 strstr (line, "Sequences producing significant alignments") == NULL)
@@ -1694,7 +1694,7 @@
 	assert (fp != NULL);
 	fgets (line, LARGE_BUFF_LENGTH, fp);
 	if (strstr (line, "Query") == NULL) {
-		fprintf (stderr,"%s line should have Query:\n");
+		fprintf (stderr,"'%s' line should have 'Query'\n", line);
 		exit (-1);
 	}
 	strptr = strtok (line, " \t\r\n"); /* this should be Query */
--- a/src/PN_convert.c
+++ b/src/PN_convert.c
@@ -2184,7 +2184,7 @@
    else
    {
       fprintf (stderr, "Can't open file '%s': %s.\n", qijname, strerror(errno) );
-      fprintf (stderr, "Current dir:\n", qijname );
+      fprintf (stderr, "Current dir: %s\n", qijname );
       system( "pwd" );
       exit (-1);
    }
--- a/src/Psiblast.c
+++ b/src/Psiblast.c
@@ -77,14 +77,14 @@
 
 	buff = strstr(Buffer, "Score=");
         if (buff != NULL) {
-                sscanf (buff, "Score = %d", alignment->score);
+                sscanf (buff, "Score = %d", &alignment->score);
         } else {
                 fprintf (errorfp, "Unable to read Score, parsing incorrect");
                 exit (-1);
         }
         buff = strstr (Buffer, "Expect = ");
         if (buff != NULL) {
-                sscanf (buff, "Expect = %lf", alignment->evalue);
+                sscanf (buff, "Expect = %lf", &alignment->evalue);
         } else {
                 fprintf (errorfp, "Unable to read e-value, parsing incorrect");
                 exit (-1);
@@ -95,7 +95,7 @@
         fgets (Buffer, LARGE_BUFF_LENGTH, fp); /* get blank line */
         fgets (Buffer, LARGE_BUFF_LENGTH, fp); /* get first line */;
         get_start_pos = TRUE;
-        while (Buffer != "\n") {
+        while ( strcmp( Buffer, "\n" ) != 0 ) {
                 read_4_alignment_lines (Buffer, alignment, fp, get_start_pos);
                 get_start_pos = FALSE; /* read 1rst 4 alignment lines*/
                                         /* already got the starting pos*/
@@ -274,7 +274,7 @@
 	FILE* psiblastfp;
 	char name[KEY_WIDTH];
 	char *strptr;
-	char line[LARGE_BUFF_LENGTH];
+	char line[LINE_LEN];
 
 
 	if ((psiblastfp = fopen (psiblastres_file, "r")) == NULL)
--- a/src/clump_output_alignedseq.c
+++ b/src/clump_output_alignedseq.c
@@ -137,7 +137,7 @@
 	char queryfilename[LARGE_BUFF_LENGTH];
 
 	if (argc < 4) {
-		printf ("clump.c : Clusters sequences into % clus");
+		printf ("clump.c : Clusters sequences into %% clus");
 	}
 
 	if (argc > 1 ) strcpy (seqfilename, argv[1]);
--- a/src/Matrix_Info.c
+++ b/src/Matrix_Info.c
@@ -467,7 +467,7 @@
 				case 2: /* +- phenotype is - */
 					if ( matrix->weights[aa_atob[c]][l] >= 0) {
 						pos_error_fp++;	error_fp++; 
-		printf ("incorrect less severe %d %d %c\n", l, matrix->weights[aa_atob[c]][l], c);
+		printf ("incorrect less severe %d %g %c\n", l, matrix->weights[aa_atob[c]][l], c);
 						print_type = print_incorrect;
 					} else if (matrix->weights[aa_atob[c]][l] < 0){
 					pos_notobserved_intolerant++;