Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

PROLINT is fucking shit

Name: Anonymous 2008-10-16 10:10

so suppose I have

arbitrary_struct* foo = NULL;
int continuing = 1;

if (NULL == ( foo = dicks_everywhere() ) )
{
  continuing = 0;
}

if (continuing && NULL != foo->loldongs )
{
  perform_dickbutt();
}

PROLINT argues that foo might be NULL in the second if YET IT OBVIOUSLY CAN'T because continuing equals zero and the right hand term of && isn't evaluated at all.

fucking hell

Name: Anonymous 2008-10-16 10:15

AND I KNOW HOW YOU KIDS LIKE EM SCHLOPPAY

Name: Anonymous 2008-10-16 10:20

I, too, demand strong AI in my debuggers.

Name: Anonymous 2008-10-16 10:29

Forget it, it's Touring complete.

Name: OP 2008-10-16 10:33

Holy flaming cuntballs. I fixed the problem by using assert(). Praise and worship <assert.h><!

Name: Anonymous 2008-10-16 11:21

arbitrary_struct* foo = NULL;
foo = dicks_everywhere();
if( foo && ! foo->loldongs )
  perform_dickbutt();


Why do you care so much about PROLINT?

Name: Anonymous 2008-10-16 14:27

#include <assert.h></assert.h>

Name: Anonymous 2008-10-16 21:01

#ifndef __DICKBUTT_H__
#define __DICKBUTT_H__

#define int dick butt

#endif /* __DICKBUTT_H__ */

Name: Anonymous 2008-10-16 21:46

>>9
dick butt *x = new dick butt(31337);
printf("%d", x);

Name: OP 2008-10-17 4:23

>>6
The point is, you can have an arbitrary amount of sanity checks in the beginning of the function and use the continuing variable to keep track of the status. The two other, and worse, methods are to have a shitload of nested ifs or goto errors.

Name: Anonymous 2008-10-17 8:36

>>10
goto considered better than state variables emulating goto.

Name: Anonymous 2008-10-17 10:15

>>10
I have a variable named errstr and label error in a lot of my functions. Then I use macro EXPECT(code,cause), which sets errstr to cause and jumps to label error if code evaluates to false value.

This looks waaaaaay better than shitload of nested ifs or your continuations

Name: IHBT 2008-10-17 13:53

>>9
lrn2preprocessor.

Name: Anonymous 2010-12-25 2:38

Name: Anonymous 2011-02-04 16:28


Don't change these.
Name: Email:
Entire Thread Thread List