Re: CVS commit: src/usr.sbin/sysinst

2019-02-27 Thread Simon Burge
Martin Husemann wrote:

> On Tue, Feb 26, 2019 at 01:09:35PM +, Joerg Sonnenberger wrote:
> > Module Name:src
> > Committed By:   joerg
> > Date:   Tue Feb 26 13:09:35 UTC 2019
> > 
> > Modified Files:
> > src/usr.sbin/sysinst: run.c
> > 
> > Log Message:
> > Avoid string + int warning.
> > 
> > 
> > To generate a diff of this commit:
> > cvs rdiff -u -r1.7 -r1.8 src/usr.sbin/sysinst/run.c
>
> What compiler warns and what are the exact details that make it warn?
> The idiom you used is IMHO extremely ugly, and I would usually rework
> it - but since I can't test that will likely break your build again.
>
> I would do: const char thirty_dashes[] = "---..---";
> and then const char * dashes = thirty_dashes +  m; addstr(dasches);

Looking at the code in question, is reducing the number of calls to
addstr() really something that needs to be optimised?  A simple

for (n = 0; n < win->ws_col; n++)
addstr("-");

is a lot easier to understand!

Cheers,
Simon.


Re: CVS commit: src/usr.sbin/sysinst

2019-02-27 Thread Martin Husemann
On Wed, Feb 27, 2019 at 07:33:11PM +1100, Simon Burge wrote:
> Looking at the code in question, is reducing the number of calls to
> addstr() really something that needs to be optimised?  A simple
> 
>   for (n = 0; n < win->ws_col; n++)
>   addstr("-");
> 
> is a lot easier to understand!

Yeah I wondered that too - are they going to show up sequentially
though, or will it all be defered untill the next update? I often use
it via a 9600bps serial console and would like to avoid incremental
changes.

Martin


Re: CVS commit: src/usr.sbin/sysinst

2019-02-27 Thread Simon Burge
Martin Husemann wrote:

> On Wed, Feb 27, 2019 at 07:33:11PM +1100, Simon Burge wrote:
> > Looking at the code in question, is reducing the number of calls to
> > addstr() really something that needs to be optimised?  A simple
> > 
> > for (n = 0; n < win->ws_col; n++)
> > addstr("-");
> > 
> > is a lot easier to understand!
>
> Yeah I wondered that too - are they going to show up sequentially
> though, or will it all be defered untill the next update? I often use
> it via a 9600bps serial console and would like to avoid incremental
> changes.

addstr() just adjusts stdscr.  The line after these is:

refresh();

which will do the actual screen refresh/update.

Cheers,
Simon.


Re: CVS commit: src/usr.sbin/sysinst

2019-02-27 Thread Martin Husemann
On Wed, Feb 27, 2019 at 10:09:44PM +1100, Simon Burge wrote:
> addstr() just adjusts stdscr.  The line after these is:
> 
>   refresh();
> 
> which will do the actual screen refresh/update.

I'll fix it as you suggested. Still would like to see more details
about what compiler and what constructs it warns about. Joerg?

Martin


Re: CVS commit: src/usr.sbin/sysinst

2019-02-27 Thread maya
On Wed, Feb 27, 2019 at 12:18:11PM +0100, Martin Husemann wrote:
> On Wed, Feb 27, 2019 at 10:09:44PM +1100, Simon Burge wrote:
> > addstr() just adjusts stdscr.  The line after these is:
> > 
> > refresh();
> > 
> > which will do the actual screen refresh/update.
> 
> I'll fix it as you suggested. Still would like to see more details
> about what compiler and what constructs it warns about. Joerg?
> 
> Martin

It is clang 8 that provides these warnings.
I assume joerg is working on an update.


Re: CVS commit: src/tests/lib/libc/atomic

2019-02-27 Thread Tetsuya Isaki
At Wed, 27 Feb 2019 10:32:11 -0500,
Christos Zoulas wrote:
> Module Name:  src
> Committed By: christos
> Date: Wed Feb 27 15:32:11 UTC 2019
> 
> Modified Files:
>   src/tests/lib/libc/atomic: t___sync_and.c
> 
> Log Message:
> Make the _and_and_ have-nots compile.

Sorry for build breakage.  And thank you.

I'm trying to add __sync_and_and_fetch_* to every libc
that got an error this time.
After confirming all build (tomorrow or later), I'll revert
your change.  Is this ok?

Thanks,
---
Tetsuya Isaki 


Re: CVS commit: src/tests/lib/libc/atomic

2019-02-27 Thread Christos Zoulas
On Feb 28,  1:05am, is...@pastel-flower.jp (Tetsuya Isaki) wrote:
-- Subject: Re: CVS commit: src/tests/lib/libc/atomic

| At Wed, 27 Feb 2019 10:32:11 -0500,
| Christos Zoulas wrote:
| > Module Name:src
| > Committed By:   christos
| > Date:   Wed Feb 27 15:32:11 UTC 2019
| > 
| > Modified Files:
| > src/tests/lib/libc/atomic: t___sync_and.c
| > 
| > Log Message:
| > Make the _and_and_ have-nots compile.
| 
| Sorry for build breakage.  And thank you.
| 
| I'm trying to add __sync_and_and_fetch_* to every libc
| that got an error this time.
| After confirming all build (tomorrow or later), I'll revert
| your change.  Is this ok?

Yes, that's a much better way to fix things! Please remove my band-aid
once you are done :-)

christos