Re: Coding/style guidelines for cryptsetup?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thank you very much!

> IMO source code is for people, not for machines enforcing rulesets.

Quite a refreshing take on that topic. I've also seen rulesets being enforced to stop discussions.

> Anyway, if you plan to write something more sophisticated, better report issue
> and discuss it first, please.

I've drafted an atomic header restore. Not entirely finished yet, but the basic functionality seems to be working. Yes I'm that guy with the overengineered transactions ;)

> >   -> do we have to declare variables at the top of functions?
> 
> yes

I'm curious what the rationale is, if you don't mind. I just have not seen this yet in post-C90 code.

> > - would adding -pedantic in GCC be acceptable? (not sure how that would work in autotools)
>
> Not for now. I use many extra warnings for tests, but pedantic is producing really garbage sometimes.

Ah, I thought that would influence pointer conversion warnings, but it doesn't. I usually write C++ and I was bitten in cryptsetup code by making silly typing mistakes like passing a void* to a void** parameter.

> But why do you need to add source code files?

I would like to add some LUKS2 unit tests. There's already unit-utils-io and api-test-2 where I could add them. Api-test-2 unfortunately has some start-up time due to device initializations, and also needs to be run as root because of that. Unit-utils-io only links against libutils_io at the moment, not against libcryptsetup.


Thanks again,
Robert
_______________________________________________
dm-crypt mailing list -- dm-crypt@xxxxxxxx
To unsubscribe send an email to dm-crypt-leave@xxxxxxxx



[Index of Archives]     [Device Mapper Devel]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux