- 论坛徽章:
- 0
|
pgi的编译系统建立正常,警告说明红色的code部分存在问题
请问如何解决?
- [root@localhost tmp]# pgcc -c test.c
- PGC-W-0118-Function r1mach does not contain a return statement (test.c: 19)
- PGC/x86-64 Linux 7.1-6: compilation completed with warnings
- [root@localhost tmp]#
复制代码
- #include <stdlib.h>
- #include <stdio.h>
- #include <float.h>
- #include <math.h>
- float r1mach_(long *i)
- {
- switch(*i){
- case 1: return FLT_MIN;
- case 2: return FLT_MAX;
- case 3: return FLT_EPSILON/FLT_RADIX;
- case 4: return FLT_EPSILON;
- case 5: return log10(FLT_RADIX);
- }
- fprintf(stderr, "invalid argument: r1mach(%ld)\n", *i);
- exit(1); return 0; /* else complaint of missing return value */
- }
- float r1mach(long *i)
- {float r1mach_(long *i);
- }
复制代码 |
|