svn commit: samba r6586 - in branches/SAMBA_3_0/source: lib libads libsmb smbd tests torture

2005-05-02 Thread herb
Author: herb
Date: 2005-05-02 17:49:43 + (Mon, 02 May 2005)
New Revision: 6586

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=6586

Log:
get rid of a few more compiler warnings


Modified:
   branches/SAMBA_3_0/source/lib/dummyroot.c
   branches/SAMBA_3_0/source/lib/dummysmbd.c
   branches/SAMBA_3_0/source/lib/interfaces.c
   branches/SAMBA_3_0/source/lib/sysquotas.c
   branches/SAMBA_3_0/source/lib/sysquotas_4A.c
   branches/SAMBA_3_0/source/lib/sysquotas_linux.c
   branches/SAMBA_3_0/source/lib/sysquotas_xfs.c
   branches/SAMBA_3_0/source/libads/kerberos.c
   branches/SAMBA_3_0/source/libsmb/clikrb5.c
   branches/SAMBA_3_0/source/smbd/notify_kernel.c
   branches/SAMBA_3_0/source/smbd/oplock_linux.c
   branches/SAMBA_3_0/source/tests/shlib.c
   branches/SAMBA_3_0/source/tests/sysquotas.c
   branches/SAMBA_3_0/source/torture/denytest.c
   branches/SAMBA_3_0/source/torture/mangle_test.c
   branches/SAMBA_3_0/source/torture/torture.c


Changeset:
Modified: branches/SAMBA_3_0/source/lib/dummyroot.c
===
--- branches/SAMBA_3_0/source/lib/dummyroot.c   2005-05-02 16:23:02 UTC (rev 
6585)
+++ branches/SAMBA_3_0/source/lib/dummyroot.c   2005-05-02 17:49:43 UTC (rev 
6586)
@@ -22,6 +22,9 @@
 /* Stupid dummy functions required due to the horrible dependency mess
in Samba. */
 
+void become_root(void);
+void unbecome_root(void);
+
 void become_root(void)
 {
 return;

Modified: branches/SAMBA_3_0/source/lib/dummysmbd.c
===
--- branches/SAMBA_3_0/source/lib/dummysmbd.c   2005-05-02 16:23:02 UTC (rev 
6585)
+++ branches/SAMBA_3_0/source/lib/dummysmbd.c   2005-05-02 17:49:43 UTC (rev 
6586)
@@ -22,6 +22,8 @@
 /* Stupid dummy functions required due to the horrible dependency mess
in Samba. */
 
+void decrement_smbd_process_count( void );
+
 void decrement_smbd_process_count( void )
 {
return;

Modified: branches/SAMBA_3_0/source/lib/interfaces.c
===
--- branches/SAMBA_3_0/source/lib/interfaces.c  2005-05-02 16:23:02 UTC (rev 
6585)
+++ branches/SAMBA_3_0/source/lib/interfaces.c  2005-05-02 17:49:43 UTC (rev 
6586)
@@ -358,6 +358,8 @@
 
 /* this wrapper is used to remove duplicates from the interface list generated
above */
+int get_interfaces(struct iface_struct *ifaces, int max_interfaces);
+
 int get_interfaces(struct iface_struct *ifaces, int max_interfaces)
 {
int total, i, j;

Modified: branches/SAMBA_3_0/source/lib/sysquotas.c
===
--- branches/SAMBA_3_0/source/lib/sysquotas.c   2005-05-02 16:23:02 UTC (rev 
6585)
+++ branches/SAMBA_3_0/source/lib/sysquotas.c   2005-05-02 17:49:43 UTC (rev 
6586)
@@ -497,6 +497,8 @@
 }
 
 #else /* HAVE_SYS_QUOTAS */
+ void dummy_sysquotas_c(void);
+
  void dummy_sysquotas_c(void)
 {
return;

Modified: branches/SAMBA_3_0/source/lib/sysquotas_4A.c
===
--- branches/SAMBA_3_0/source/lib/sysquotas_4A.c2005-05-02 16:23:02 UTC 
(rev 6585)
+++ branches/SAMBA_3_0/source/lib/sysquotas_4A.c2005-05-02 17:49:43 UTC 
(rev 6586)
@@ -335,5 +335,7 @@
 }
 
 #else /* HAVE_QUOTACTL_4A */
+ void dummy_sysquotas_4A(void);
+
  void dummy_sysquotas_4A(void){}
 #endif /* HAVE_QUOTACTL_4A */

Modified: branches/SAMBA_3_0/source/lib/sysquotas_linux.c
===
--- branches/SAMBA_3_0/source/lib/sysquotas_linux.c 2005-05-02 16:23:02 UTC 
(rev 6585)
+++ branches/SAMBA_3_0/source/lib/sysquotas_linux.c 2005-05-02 17:49:43 UTC 
(rev 6586)
@@ -556,5 +556,7 @@
 }
 
 #else /* HAVE_QUOTACTL_LINUX */
+ void dummy_sysquotas_linux(void);
+
  void dummy_sysquotas_linux(void){}
 #endif /* HAVE_QUOTACTL_LINUX */

Modified: branches/SAMBA_3_0/source/lib/sysquotas_xfs.c
===
--- branches/SAMBA_3_0/source/lib/sysquotas_xfs.c   2005-05-02 16:23:02 UTC 
(rev 6585)
+++ branches/SAMBA_3_0/source/lib/sysquotas_xfs.c   2005-05-02 17:49:43 UTC 
(rev 6586)
@@ -329,5 +329,7 @@
 }
 
 #else /* HAVE_XFS_QUOTAS */
+ void dummy_sysquotas_xfs(void);
+
  void dummy_sysquotas_xfs(void){}
 #endif /* HAVE_XFS_QUOTAS */

Modified: branches/SAMBA_3_0/source/libads/kerberos.c
===
--- branches/SAMBA_3_0/source/libads/kerberos.c 2005-05-02 16:23:02 UTC (rev 
6585)
+++ branches/SAMBA_3_0/source/libads/kerberos.c 2005-05-02 17:49:43 UTC (rev 
6586)
@@ -248,7 +248,7 @@
  Setting principal to NULL deletes this entry.
  /
 
- BOOL kerberos_secrets_store_salting_principal(const char *service,
+BOOL kerberos_secrets_store_salting_principal(const char *service,
   

Re: svn commit: samba r6586 - in branches/SAMBA_3_0/source: lib libads libsmb smbd tests torture

2005-05-02 Thread derrell
[EMAIL PROTECTED] writes:

 Log:
 get rid of a few more compiler warnings

 Modified: branches/SAMBA_3_0/source/lib/dummyroot.c
 ===
 --- branches/SAMBA_3_0/source/lib/dummyroot.c 2005-05-02 16:23:02 UTC (rev 
 6585)
 +++ branches/SAMBA_3_0/source/lib/dummyroot.c 2005-05-02 17:49:43 UTC (rev 
 6586)
 @@ -22,6 +22,9 @@
  /* Stupid dummy functions required due to the horrible dependency mess
 in Samba. */
  
 +void become_root(void);
 +void unbecome_root(void);
 +
  void become_root(void)
  {
  return;


Herb, I don't get it.  What is the purpose of a forward declaration
immediately prior to an actual function declaration?  What type of warning
were you getting that this solves?

Confused,

Derrell


Re: svn commit: samba r6586 - in branches/SAMBA_3_0/source: lib libads libsmb smbd tests torture

2005-05-02 Thread derrell
[EMAIL PROTECTED] writes:

 [EMAIL PROTECTED] writes:

 Log:
 get rid of a few more compiler warnings

 Modified: branches/SAMBA_3_0/source/lib/dummyroot.c
 ===
 --- branches/SAMBA_3_0/source/lib/dummyroot.c2005-05-02 16:23:02 UTC 
 (rev 6585)
 +++ branches/SAMBA_3_0/source/lib/dummyroot.c2005-05-02 17:49:43 UTC 
 (rev 6586)
 @@ -22,6 +22,9 @@
  /* Stupid dummy functions required due to the horrible dependency mess
 in Samba. */
  
 +void become_root(void);
 +void unbecome_root(void);
 +
  void become_root(void)
  {
  return;


 Herb, I don't get it.  What is the purpose of a forward declaration
 immediately prior to an actual function declaration?  What type of warning
 were you getting that this solves?

Herb, in talking with abartlet, I now understand what problem this was trying
to solve.  These are public functions, and therefore should have calls by
external (not in the same file) users.  (If not, they'd likely be declared
static.)  These stub functions that you have corrected should, as you
discovered, have external declarations as well.  Since the callers are
intended to be external, the external declarations should really be in a
header file so that all callers to these functions are using the same external
declaration.  By putting the external declarations in the C file with the
function declaration, the warning is removed, but the purpose of the warning
is defeated.

In our discussion, abartlet and I agreed that the proper place for these
declarations is probably in proto.h, which raises the question as to why they
are not automagically being added to proto.h.  Would you like to try to figure
out why they're not being generated in proto.h, and perhaps fix it so they
are?

If there is some reason that they shouldn't in fact, go in proto.h, then it
seems that includes.h would likely be the right place for them.

Cheers,

Derrell