Mailinglist Archive: opensuse-packaging (266 mails)

< Previous Next >
Re: [opensuse-packaging] How to disable no-return-in-nonvoid-function?

Quoting "Dominique Leuenberger a.k.a DimStar" <DimStar@xxxxxxxxxxxx>:

See for example this code piece (C++)

###
#include <iostream>

int foo() {
int a = 5;
int b = a + 1;
}

int main() { std::cout << foo() << std::endl; }
###

To make this code a bit less obvious, simply use:
###
#include <iostream>

int foo() {
int a = 5;
int b = a + 1;
char* c = NULL;
}

int main() { std::cout << foo() << std::endl; }
###

=> the output of foo() is equal between the two...

Dominique
--
To unsubscribe, e-mail: opensuse-packaging+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse-packaging+owner@xxxxxxxxxxxx

< Previous Next >