[patch] warning: no return statement in function returning non-void
BERO <[email protected]> Wed, 27 Apr 2005 19:12:23 +0900
| Newsgroups | gmane.comp.file-systems.sfs.general |
|---|---|
| Message-ID | <[email protected]> |
small bug fix for sfs-0.7.2 with my gcc-3.2.3, compilation failed without this patch because of "warning: no return statement in function returning non-void" on CVS version, sfsmisc/nfsserv.h was fixed but arpc/rpc_types.h is not fixed. for RPM based distrib user, download sfs-0.7.2-1.src.rpm ,patch spec file and rebuild. <cid:[email protected]> BERO
sfs-0.7.2.spec.diff
(text/plain, 602 B)
--- sfs-0.7.2.spec.orig 2002-12-10 13:03:50.000000000 +0900
+++ sfs-0.7.2.spec 2005-04-27 17:33:38.000000000 +0900
@@ -12,10 +12,11 @@
Summary: SFS -- a secure, decentralized, global file system
Name: sfs
Version: 0.7.2
-Release: 1
+Release: 2
Copyright: GPL
Group: Applications/File
Source: http://www.fs.net/download/sfs-%{version}.tar.gz
+Patch0: sfs-%{version}-bug.patch
URL: http://www.fs.net/
Packager: SFS Developers <http://www.fs.net/>
BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot
@@ -60,6 +61,7 @@
%prep
%setup -q
+%patch0 -p1
%build
if test -z "${DEBUG+set}"; then
sfs-0.7.2-bug.patch
(text/plain, 1.1 KB)
diff -ru sfs-0.7.2.orig/arpc/rpctypes.h sfs-0.7.2/arpc/rpctypes.h
--- sfs-0.7.2.orig/arpc/rpctypes.h 2002-05-28 19:29:15.000000000 +0900
+++ sfs-0.7.2/arpc/rpctypes.h 2005-04-27 17:31:00.000000000 +0900
@@ -176,7 +176,7 @@
rpc_vec &set (elm_t *base, size_t len, freemode_t m = NOFREE)
{ mcheck (len); del (); mode = m; nelm = len; vec = base; return *this; }
template<size_t m> rpc_vec &set (const ::vec<T, m> &v)
- { set (v.base (), v.size ()); }
+ { return set (v.base (), v.size ()); }
void swap (rpc_vec &a) {
freemode_t m = a.mode;
sfs-0.7.2¤À¤±¤Ëȯ¸«: sfs-0.7.2-bug.patch
diff -ru sfs-0.7.2.orig/sfsmisc/nfsserv.h sfs-0.7.2/sfsmisc/nfsserv.h
--- sfs-0.7.2.orig/sfsmisc/nfsserv.h 2002-09-20 05:04:20.000000000 +0900
+++ sfs-0.7.2/sfsmisc/nfsserv.h 2005-04-27 17:30:29.000000000 +0900
@@ -103,7 +103,7 @@
return static_cast<T *> (getvoidarg ());
}
template<class T> const T *getarg () const {
- const_cast<nfscall *> (this)->template getarg<T> ();
+ return const_cast<nfscall *> (this)->template getarg<T> ();
}
void clearres ();
void *getvoidres ();