Samba
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
Go Back   Web Development Archives Mailing Lists Samba

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Web Development Archives Sponsor:
  #1  
Old July 1st, 2008, 05:11 PM
Jim Brown
Guest
Dev Archives Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
IRIX cc fixes for Samba 3.2.0

There are three source files that compare unsigned values with 0.
The is one source file with an invalid format in a DEBUG message.
Here are the patches for all four problems.

1. lib/replace/strptime.c: get_number and get_alt_number macros.
This is cosmetic since there is a matching upper limit check (this
removes many compiler warnings).
2. lib/smbconf/smbconf_util.c: the decrementing loop variable is always
non-negative.
This is an error.
3. libsmb/clientgen.c: the return code in 'len' is always non-negative.
This is an error.
4. smbd/oplock_irix.c: Invalid format: '5s' instead of '%s' in DEBUG level 5
macro.
This is an error.

Jim Brown

diff -c lib/replace/strptime.c.orig lib/replace/strptime.c
lib/replace/strptime.c.orig Thu Jul 3 05:54:22 2008
lib/replace/strptime.c Thu Jul 3 05:54:41 2008

253,259
{
const char *rp_backup;
int cnt;
! size_t val;
int have_I, is_pm;
int century, want_century;
int want_era;
253,259
{
const char *rp_backup;
int cnt;
! ssize_t val;
int have_I, is_pm;
int century, want_century;
int want_era;

diff -c lib/smbconf/smbconf_util.c
Thu Jul 3 05:56:14 2008
lib/smbconf/smbconf_util.c Thu Jul 3 05:57:10 2008

132,138
bool smbconf_reverse_find_in_array(const char *string, char **list,
uint32_t num_entries, uint32_t *entry)
{
! uint32_t i;

if ((string == NULL) || (list == NULL) || (num_entries == 0)) {
return false;
132,138
bool smbconf_reverse_find_in_array(const char *string, char **list,
uint32_t num_entries, uint32_t *entry)
{
! int32_t i;

if ((string == NULL) || (list == NULL) || (num_entries == 0)) {
return false;

diff -c libsmb/clientgen.c.orig libsmb/clientgen.c
libsmb/clientgen.c.orig Thu Jul 3 05:57:46 2008
libsmb/clientgen.c Thu Jul 3 06:07:05 2008

97,103
return -1;
}

! if (len < 0) {
return len;
}

97,103
return -1;
}

! if ((ssize_t)len < 0) {
return len;
}

diff -c smbd/oplock_irix.c.orig smbd/oplock_irix.c
smbd/oplock_irix.c.orig Thu Jul 3 06:24:23 2008
smbd/oplock_irix.c Thu Jul 3 06:25:17 2008

184,190
strerror(errno) ));
} else {
DEBUG(5,("irix_set_kernel_oplock: Refused oplock on
"
! "file %s, fd = %d, file_id = 5s, "
"gen_id = %ul. Another process had the file
"
"open.\n",
fsp->fsp_name, fsp->fh->fd,
184,190
strerror(errno) ));
} else {
DEBUG(5,("irix_set_kernel_oplock: Refused oplock on
"
! "file %s, fd = %d, file_id = %s, "
"gen_id = %ul. Another process had the file
"
"open.\n",
fsp->fsp_name, fsp->fh->fd,

Reply With Quote
  #2  
Old July 1st, 2008, 05:51 PM
Jeremy Allison
Guest
Dev Archives Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
IRIX cc fixes for Samba 3.2.0

Tue, Jul 01, 2008 at 09:37:04PM -0000, Jim Brown wrote:
There are three source files that compare unsigned values with 0.
The is one source file with an invalid format in a DEBUG message.
Here are the patches for all four problems.

1. lib/replace/strptime.c: get_number and get_alt_number macros.
This is cosmetic since there is a matching upper limit check (this
removes many compiler warnings).
2. lib/smbconf/smbconf_util.c: the decrementing loop variable is always
non-negative.
This is an error.
3. libsmb/clientgen.c: the return code in 'len' is always non-negative.
This is an error.
4. smbd/oplock_irix.c: Invalid format: '5s' instead of '%s' in DEBUG level 5
macro.
This is an error.

Thanks, I've fixed these except for (1), which is in code so
complex I'm not going to mess with it until I completely
understand it :-).

Also I think (2) exposed a more general bug in that the
index should be decremented, not incremented here.

Thanks for your sharp eyes !

Jeremy.

Reply With Quote
Reply

Viewing: Web Development Archives Mailing Lists Samba > IRIX cc fixes for Samba 3.2.0


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway