[cups] [PATCH] scheduler/type: debug_ops[] is out of sync

Brian Norris computersforpeace at gmail.com
Wed Mar 16 12:47:22 PDT 2016


On Wed, Mar 16, 2016 at 12:31:52PM -0700, Brian Norris wrote:
> Hi,
> 
> I'd report a new bug, but the bug tracker is down for maintenance.
> 
> Since the addition of MIME_MAGIC_REGEX, the debug_ops[] array is out of
> sync with the mime_op_t enum. This causes segfaults when using
> --enable-debug-printfs. Attaching a patch to fix this.
> 
> It'd be best if we could use the compiler to our advantage to catch
> these types of errors (e.g., introduce some kind of compile-time
> assertion;, or use a switch/case without a 'default' instead of an
> array, since many compilers would warn about the unused enum), but I
> didn't really want to refactor this all for a bugfix. I'm also not as
> familiar with the non-Linux systems that CUPS is built for, so I'm not
> sure what (if any) C99 features I could use, for instance.
> 
> Regards,
> Brian

Sorry, got the patch wrong. Attaching the real one this time.

Regards,
Brian


More information about the cups mailing list