🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #261896

Peter Kohlmann _personally edited, compiled and debugged a .C file ?

#261896
From: Jeff-Relf.Me
Date: Mon, 27 Mar 2017 18:10
82 lines
4240 bytes
Peter Köhlmann replied ( to my comment ):
> > > Jeff Relf:   " Testing is how you know if the code works or not,
> > >                 not compile-time warnings. "
> > 
> > Relf's claim is maximum stupid.
> > Someone like Relf should not be allowed anywhere near a compiler.

I edited, compiled and debugged X.CPP yesterday,
in order to test the speed and accuracy of various "pay" servers.

When was the last time Peter Köhlmann _personally 
( hiring a plumber doesn't make you a plumber )
edited, compiled and debugged a .C file ?

With "warnings as errors", turn off these warnings:

  c4702: UnReachable code.

    A tempory "return" is needed, at times, when debugging.

  c4100: unreferenced parameter.
  c4101: unreferenced local variable.
  c4189: local variable is initialized but not referenced.

    Variables gets commented out, at times, when debugging.
    UnUsed code is informative, and might be needed again.

  c4430 missing type specifier - int assumed; No C++ support.
  c4508 'Func': function should return a value; 'void' assumed.

    "Func() {}" is cleaner/nicer than "void Func() {}".

  c4456 declaration of 'P' hides previous local declaration.
  c4457 declaration of 'P' hides function parameter.
  c4459 declaration of 'P' hides global declaration.
       
    P ( a ShortTerm, local pointer ) is cleaner/nicer.

  c4996 'sprintf': This function may be unsafe.

    Str( Err, L"0x%x", Enum )  is cleaner/nicer than 
    swprintf_s( Err, 22, L"0x%x", Enum ).
    Global:  #define  Str  swprintf

  c4239 type conversion; No C++ support.
  c4312 conversion from a smaller type to a larger type.
  c4305 truncation from 'double' to 'float'.
  c4302 conversion from a larger type to a smaller type.
  c4244 '=': conversion from 'int' to 'char', possible loss of data.
  c4838 conversion from 'int' to 'wchar' requires a narrowing conversion
  c4311 64-bit pointer truncation ( storing shorts in a pointer ).

    Implicit casting is cleaner/nicer.

  c4127 conditional expression is constant.

    while(1) is OK.
    "if ( ComplexExpression, 1 )" is a good debugging technique.

  c4706 assignment within conditional expression.
  c4709 comma operator within array index expression.

    Often, it's cleaner/nicer to assign stuff in an expression;
    same for array indices, "R_[ i++, i %= 4 ]".

  c4554 check operator precedence for possible error ( Level 3 ? ! )

    Fewer parenthesis is cleaner/nicer; just know the precedence.

  c4474 'swprintf' : too many arguments passed for format string.
       
    A format string, passed to a macro, 
    might have default (unused) arguments.

  c4458 declaration of 'a' hides class member.

    <D2D1helper.H> needs it, don't know why.

  c4238 nonstandard extension used: class rvalue used as lvalue.

    Needed when a simple int is (foolishly) defined as an overly 
    convoluted/Byzantine class ( like ID2D1SolidColorBrush ).
Technical Details
Message-ID: <Jeff-Relf.Me@Mar.27--11.10A.Seattle.2017>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-comp.lang.c++.(381507).mbox.7z!not-for-mail
References: <ob0vmr$d4l$1@deskrabbit.motzarella.org> <ov18dc9ckjlqebird9fppuff0k44qs15uj@4ax.com> <hn48dc97bsrhhrg67j174tfk7pngjvli4e@4ax.com> <obbcrt$f0t$6@dont-email.me> <obbel4$mag$1@dont-email.me> <obbglg$u8e$1@dont-email.me>

Show Full Headers
Complete Article Headers
Message-ID: <Jeff-Relf.Me@Mar.27--11.10A.Seattle.2017>
Subject: Peter Kohlmann _personally edited, compiled and debugged a .C file ?
Date: Mon, 27 Mar 2017 18:10:26 +0000
From: Jeff-Relf.Me @.
References: <ob0vmr$d4l$1@deskrabbit.motzarella.org> <ov18dc9ckjlqebird9fppuff0k44qs15uj@4ax.com> <hn48dc97bsrhhrg67j174tfk7pngjvli4e@4ax.com> <obbcrt$f0t$6@dont-email.me> <obbel4$mag$1@dont-email.me> <obbglg$u8e$1@dont-email.me>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-comp.lang.c++.(381507).mbox.7z!not-for-mail
Newsgroups: comp.os.linux.advocacy,sci.physics,news.software.readers,comp.lang.c++
Organization: Glorb Internet Services, http://www.glorb.com
Lines: 82
NNTP-Posting-Host: /zlDkqjrFG1Uj/denlv3LA.995.posting.glorb.com
Content-Type: Text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Complaints-To: abuse@glorb.com
NNTP-Posting-Date: Mon, 27 Mar 2017 18:10:25 +0000 (UTC)
User-Agent: Jeff-Relf.Me/X.HTM
X-Notice: Scanned by Mr. Bill
X-Received-Body-CRC: 897015687
X-Received-Bytes: 4108