sessreg: Changes to 'master'

Alan Coopersmith alanc at kemper.freedesktop.org
Sun Dec 16 12:49:16 PST 2012


 sessreg.c |   18 ++++--------------
 sessreg.h |   14 +++++++-------
 2 files changed, 11 insertions(+), 21 deletions(-)

New commits:
commit 64e773800f70a4e9ebc0e606150beaff9b839fd9
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date:   Sun Dec 16 12:46:50 2012 -0800

    Fix some clang warnings about implicit conversions
    
    sessreg.c:360:43: warning: implicit conversion changes signedness:
          'unsigned long' to 'off_t' (aka 'long') [-Wsign-conversion]
                            sysnerr (lseek(llog, (long) pwd->pw_uid*sizeof(ll), 0)
                                     ~~~~~       ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
    sessreg.c:360:25: warning: implicit conversion changes signedness: 'long' to
          'unsigned long' [-Wsign-conversion]
                            sysnerr (lseek(llog, (long) pwd->pw_uid*sizeof(ll), 0)
                                                 ^~~~~~~~~~~~~~~~~~~
    
    sessreg.c:405:7: warning: implicit conversion loses integer precision: 'size_t'
          (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
                    i = strlen (line);
                      ~ ^~~~~~~~~~~~~
    sessreg.c:406:9: warning: comparison of integers of different signs: 'int' and
          'unsigned long' [-Wsign-compare]
                    if (i >= sizeof (u->ut_id))
                        ~ ^  ~~~~~~~~~~~~~~~~~
    
    sessreg.c:494:7: warning: implicit conversion loses integer precision: 'size_t'
          (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
                    i = strlen (line);
                      ~ ^~~~~~~~~~~~~
    sessreg.c:495:9: warning: comparison of integers of different signs: 'int' and
          'unsigned long' [-Wsign-compare]
                    if (i >= sizeof (u->ut_id))
                        ~ ^  ~~~~~~~~~~~~~~~~~
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>

commit 88bf1500095d7aaea9689a6d0367d6ff5c868292
Author: Ed Schouten <ed at 80386.nl>
Date:   Sat Sep 15 20:27:57 2012 +0200

    Remove dubious code.
    
    The NO_UTMP definition is set on non-FreeBSD, non-OpenBSD, BSD-based
    systems. When looking at the commonly used BSD-based operating systems,
    they either use utmpx, or I can't think of a reason why the utmp code
    wouldn't work.
    
    If it turns out some obscure operating system breaks because of this
    change, we should replace this by something more accurate, such as an
    Autoconf check or an #ifdef specific to that operating system.
    
    Signed-off-by: Ed Schouten <ed at 80386.nl>
    Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>

commit d6570f5188ac8b223a2ae8d1ef596f313938acca
Author: Ed Schouten <ed at 80386.nl>
Date:   Sat Sep 15 20:26:57 2012 +0200

    Make the `line' variable local to main().
    
    It is only used within main(). This prevents a compilation failure when
    building with -Wshadow.
    
    Signed-off-by: Ed Schouten <ed at 80386.nl>
    Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>

commit 8963bc3df6d3e9627c82171c3c931616f27fd528
Author: Ed Schouten <ed at 80386.nl>
Date:   Sat Sep 15 20:11:20 2012 +0200

    Place NetBSD specific #defines in the proper place.
    
    For all the other databases (utmp, wtmp, lastlog) we already do it in
    sessreg.h. There's no reason why we should place the utmpx specific ones
    in sessreg.c.
    
    Signed-off-by: Ed Schouten <ed at 80386.nl>
    Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>



More information about the xorg-commit mailing list