File: c_warning_cleanups_and_defines_for_Float128

package info (click to toggle)
cxref 1.6e-9
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,332 kB
  • sloc: ansic: 16,598; yacc: 2,091; sh: 945; lex: 470; perl: 452; makefile: 439; lisp: 256; cpp: 188; python: 80
file content (269 lines) | stat: -rw-r--r-- 9,078 bytes parent folder | download | duplicates (4)
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
Description: <short summary of the patch>
 TODO: Put a short summary on the line above and replace this paragraph
 with a longer explanation of this change. Complete the meta-information
 with other relevant fields (see below for details). To make it easier, the
 information below has been extracted from the changelog. Adjust it or drop
 it.
 .
 cxref (1.6e-3) unstable; urgency=high
 .
   * Bug fix: "cxref FTBFS on amd64/i386 with glibc 2.26", thanks to Adrian
     Bunk (Closes: #887866).
   * Added homepage entry to control
   * Bug fix: "please add Homepage field", thanks to Juhani Numminen
     (Closes: #888483).
   * Bug fix: "Duplicate and conflicting definition of function
     check_assertion", thanks to Michael Tautschnig (Closes: #748116).
     Fixed in 1.6e upstream.
   * Bug fix: "maintainer script(s) do not start on #!", thanks to
     treinen@debian.org</a>; (Closes: #843271).
   * Bug fix: "maintainer script(s) not using strict mode", thanks to
     treinen@debian.org</a>; (Closes: #866264).
   * compat level 9
   * dh_prep
Author: Camm Maguire <camm@debian.org>
Bug-Debian: https://bugs.debian.org/748116
Bug-Debian: https://bugs.debian.org/843271
Bug-Debian: https://bugs.debian.org/866264
Bug-Debian: https://bugs.debian.org/887866
Bug-Debian: https://bugs.debian.org/888483

---
The information above should follow the Patch Tagging Guidelines, please
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:

Origin: <vendor|upstream|other>, <url of original patch>
Bug: <url in upstream bugtracker>
Bug-Debian: https://bugs.debian.org/<bugnumber>
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
Forwarded: <no|not-needed|url proving that it has been forwarded>
Reviewed-By: <name and email of someone who approved the patch>
Last-Update: 2018-01-30

--- cxref-1.6e.orig/cpp/cccp.c
+++ cxref-1.6e/cpp/cccp.c
@@ -4291,7 +4291,7 @@ special_symbol (hp, op)
       if (instack[i].fname != NULL)
         true_indepth++;
 
-    buf = (char *) alloca (8);	/* Eight bytes ought to be more than enough */
+    buf = (char *) alloca (11);	/* Eight bytes ought to be more than enough */
     sprintf (buf, "%d", true_indepth - 1);
     break;
 
--- cxref-1.6e.orig/doc/Makefile.in
+++ cxref-1.6e/doc/Makefile.in
@@ -98,8 +98,8 @@ faq-html : $(srcdir)/FAQ $(srcdir)/FAQ-h
 
 readme : $(srcdir)/README.c
 	[ -f README.c ] || cp $(srcdir)/README.c .
-	../src/cxref -O. -NREADME-TMP -xref README.c
-	../src/cxref -O. -NREADME-TMP -xref README.c -latex -html-src -rtf -sgml
+	../src/cxref  -D_Float128='long double' -O. -NREADME-TMP -xref README.c
+	../src/cxref  -D_Float128='long double' -O. -NREADME-TMP -xref README.c -latex -html-src -rtf -sgml
 	mv README.c.tex README_c.tex
 	[ "x$(LATEX)" = "x" ] || $(LATEX) $(srcdir)/README.tex > /dev/null 2>&1
 	[ "x$(LATEX)" = "x" ] || $(LATEX) $(srcdir)/README.tex
--- cxref-1.6e.orig/query/input.c
+++ cxref-1.6e/query/input.c
@@ -72,6 +72,17 @@ static void cross_reference_variables(vo
   Read in all the information from the cross reference files.
   ++++++++++++++++++++++++++++++++++++++*/
 
+#include <errno.h>
+#define massert(a_) \
+  ({errno=0;\
+    if (!(a_)||errno) {\
+      fprintf(stderr,"The assertion %s on line %d of %s in function %s failed: %s",\
+	      #a_,__LINE__,__FILE__,__FUNCTION__,strerror(errno));\
+      exit(1);\
+    }\
+  })
+
+
 void LoadInCrossRefs(void)
 {
  FILE *in;
@@ -108,7 +119,7 @@ void LoadInCrossRefs(void)
          {
           Include inc=(Include)Calloc(1,sizeof(struct _Include));
 
-          fscanf(in,"%s%c",include,&ch);
+          massert(fscanf(in,"%s%c",include,&ch)!=EOF);
 
           if(include[0]=='%')
              {inc->scope=LOCAL;
@@ -181,7 +192,7 @@ void LoadInCrossRefs(void)
        while(ch==' ')
          {
           char* c;
-          fscanf(in,"%s%c",called,&ch);
+          massert(fscanf(in,"%s%c",called,&ch)!=EOF);
 
           c=called;
           if(c[0]=='%') c++;
@@ -248,7 +259,7 @@ void LoadInCrossRefs(void)
 
        while(ch==' ')
          {
-          fscanf(in,"%s%c",funcname,&ch);
+	   massert(fscanf(in,"%s%c",funcname,&ch)!=EOF);
 
           if(funcname[0]=='$')
              AddToStringList2(variables[n_variables]->used,"$",filename,1,0);
@@ -284,7 +295,7 @@ void LoadInCrossRefs(void)
       {
        int i;
 
-       fgets(typetype,TYPE_MAX_LEN,in);
+       massert(fgets(typetype,TYPE_MAX_LEN,in)!=NULL);
        typetype[strlen(typetype)-1]=0;
 
        if(n_typedefs)
--- cxref-1.6e.orig/src/cxref.c
+++ cxref-1.6e/src/cxref.c
@@ -948,7 +948,8 @@ static FILE* popen_execvp(char** command
  else                            /* The child */
    {
     close(1);
-    dup(fdr[1]);
+    if (dup(fdr[1])==-1)
+      {fprintf(stderr,"cxref: Can not dup(licate) pipe outputfor '%s'.\n",command[0]);exit(1);}
     close(fdr[1]);
 
     close(fdr[0]);
--- cxref-1.6e.orig/src/xref.c
+++ cxref-1.6e/src/xref.c
@@ -75,6 +75,15 @@ static void fixup_extern_var(Variable va
 
   int outputs Set to true if any cross referencing to produce outputs is required.
   ++++++++++++++++++++++++++++++++++++++*/
+#include <errno.h>
+#define massert(a_) \
+  ({errno=0;\
+    if (!(a_)||errno) {\
+      fprintf(stderr,"The assertion %s on line %d of %s in function %s failed: %s",\
+	      #a_,__LINE__,__FILE__,__FUNCTION__,strerror(errno));\
+      exit(1);\
+    }\
+  })
 
 void CrossReference(File file,int outputs)
 {
@@ -115,7 +124,7 @@ void CrossReference(File file,int output
 
           while(ch==' ')
             {
-             fscanf(in,"%s%c",include,&ch);
+	      massert(fscanf(in,"%s%c",include,&ch)!=EOF);
 
              if(diff_file)
                 fprintf(out," %s",include);
@@ -222,7 +231,7 @@ void CrossReference(File file,int output
 
           while(ch==' ')
             {
-             fscanf(in,"%s%c",called,&ch);
+	      massert(fscanf(in,"%s%c",called,&ch)!=EOF);
 
              if(diff_file)
                {
@@ -300,7 +309,7 @@ void CrossReference(File file,int output
 
           while(ch==' ')
             {
-             fscanf(in,"%s%c",funcname,&ch);
+	      massert(fscanf(in,"%s%c",funcname,&ch)!=EOF);
 
              if(diff_file)
                {
@@ -372,7 +381,7 @@ void CrossReference(File file,int output
           if(diff_file)
              fprintf(out,"%s %s",filename,typename);
 
-          fgets(typename,TYPE_MAX_LEN,in);
+          massert(fgets(typename,TYPE_MAX_LEN,in)!=NULL);
 
           if(diff_file)
              fputs(typename,out);
@@ -644,7 +653,7 @@ void CreateAppendix(StringList files,Str
          {
           AddToStringList(files,filename,1,1);
           while(ch==' ')
-             fscanf(in,"%s%c",include,&ch);
+	    massert(fscanf(in,"%s%c",include,&ch)!=EOF);
          }
 
        fclose(in);
@@ -667,7 +676,7 @@ void CreateAppendix(StringList files,Str
           if(scope&GLOBAL)
              AddToStringList2(funcs,caller,filename,1,1);
           while(ch==' ')
-             fscanf(in,"%s%c",called,&ch);
+	    massert(fscanf(in,"%s%c",called,&ch)!=EOF);
          }
 
        fclose(in);
@@ -690,7 +699,7 @@ void CreateAppendix(StringList files,Str
           if(scope&GLOBAL)
              AddToStringList2(vars,variable,filename,1,1);
           while(ch==' ')
-             fscanf(in,"%s%c",funcname,&ch);
+	    massert(fscanf(in,"%s%c",funcname,&ch)!=EOF);
          }
 
        fclose(in);
@@ -711,14 +720,14 @@ void CreateAppendix(StringList files,Str
          {
           if(typename[0]=='#')
             {
-             fgets(typename,TYPE_MAX_LEN,in);
+	      massert(fgets(typename,TYPE_MAX_LEN,in)!=NULL);
              typename[strlen(typename)-1]=0;
              AddToStringList2(types,&typename[1],filename,1,1);
             }
           else
             {
              AddToStringList2(types,typename,filename,1,1);
-             fgets(typename,TYPE_MAX_LEN,in);
+             massert(fgets(typename,TYPE_MAX_LEN,in)!=NULL);
             }
          }
 
@@ -762,7 +771,7 @@ void CrossReferenceDelete(char *name)
 
        while(ch==' ')
          {
-          fscanf(in,"%s%c",include,&ch);
+	   massert(fscanf(in,"%s%c",include,&ch)!=EOF);
 
           if(diff_file)
              fprintf(out," %s",include);
@@ -808,7 +817,7 @@ void CrossReferenceDelete(char *name)
 
        while(ch==' ')
          {
-          fscanf(in,"%s%c",called,&ch);
+	   massert(fscanf(in,"%s%c",called,&ch)!=EOF);
           if(diff_file)
              fprintf(out," %s",called);
          }
@@ -853,7 +862,7 @@ void CrossReferenceDelete(char *name)
 
        while(ch==' ')
          {
-          fscanf(in,"%s%c",funcname,&ch);
+	   massert(fscanf(in,"%s%c",funcname,&ch)!=EOF);
 
           if(diff_file)
              fprintf(out," %s",funcname);
@@ -896,7 +905,7 @@ void CrossReferenceDelete(char *name)
        if(diff_file)
           fprintf(out,"%s %s",filename,typename);
 
-       fgets(typename,TYPE_MAX_LEN,in);
+       massert(fgets(typename,TYPE_MAX_LEN,in)!=NULL);
 
        if(diff_file)
           fputs(typename,out);