mariusor,
@mariusor@metalhead.club avatar

Man, fixing warnings from -Wpedantic and -Wextra is a damn chore.

drewdevault,
@drewdevault@fosstodon.org avatar

@mariusor okay but also let us know how many of those warnings were actual bugs

mariusor,
@mariusor@metalhead.club avatar

@drewdevault Frankly I don't have enough C experience to judge that for the more arcane of them.

Most of them I would say not, but maybe I'm just being defensive. :D

Currently struggling with stringop ones, which make it a pain to compute memory regions of sufficient size for storing dynamic strings.

drewdevault,
@drewdevault@fosstodon.org avatar

@mariusor one tip for strings is to use snprintf with a null output string, which will compute the size needed and return that (for allocating, then calling snprintf again)

mariusor,
@mariusor@metalhead.club avatar

@drewdevault that's actually kind of cool, it would never have occurred to me. I was just thinking to allocate a random half meg block for every string. :D

mariusor,
@mariusor@metalhead.club avatar

@drewdevault just in case that horrified anyone, by "allocate" I mean on the stack, these are short lived strings for logging.

drewdevault,
@drewdevault@fosstodon.org avatar

@mariusor that is even more horrifying

mariusor,
@mariusor@metalhead.club avatar

@drewdevault =)) Why?

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • DreamBathrooms
  • ngwrru68w68
  • InstantRegret
  • magazineikmin
  • thenastyranch
  • rosin
  • khanakhh
  • tacticalgear
  • Youngstown
  • slotface
  • Durango
  • kavyap
  • mdbf
  • ethstaker
  • JUstTest
  • GTA5RPClips
  • modclub
  • tester
  • Leos
  • osvaldo12
  • cisconetworking
  • everett
  • cubers
  • normalnudes
  • anitta
  • megavids
  • provamag3
  • lostlight
  • All magazines