{"record":{"id":"2fdb1ee14df679a6","repo":"DrKLO/Telegram","slug":"s-missing-argument-for-quality","errorCode":null,"errorMessage":"%s: missing argument for quality\n","messagePattern":"(.+?): missing argument for quality\n","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"TMessagesProj/jni/mozjpeg/cjpeg.c","lineNumber":451,"sourceCode":"      fprintf(stderr, \"%s: sorry, progressive output was not compiled in\\n\",\n              progname);\n      exit(EXIT_FAILURE);\n#endif\n\n    } else if (keymatch(arg, \"memdst\", 2)) {\n      /* Use in-memory destination manager */\n#if JPEG_LIB_VERSION >= 80 || defined(MEM_SRCDST_SUPPORTED)\n      memdst = TRUE;\n#else\n      fprintf(stderr, \"%s: sorry, in-memory destination manager was not compiled in\\n\",\n              progname);\n      exit(EXIT_FAILURE);\n#endif\n\n    } else if (keymatch(arg, \"quality\", 1)) {\n      /* Quality ratings (quantization table scaling factors). */\n      if (++argn >= argc) {      /* advance to next argument */\n        fprintf(stderr, \"%s: missing argument for quality\\n\", progname);\n        usage();\n      }\n      qualityarg = argv[argn];\n\n    } else if (keymatch(arg, \"qslots\", 2)) {\n      /* Quantization table slot numbers. */\n      if (++argn >= argc)       /* advance to next argument */\n        usage();\n      qslotsarg = argv[argn];\n      /* Must delay setting qslots until after we have processed any\n       * colorspace-determining switches, since jpeg_set_colorspace sets\n       * default quant table numbers.\n       */\n\n    } else if (keymatch(arg, \"qtables\", 2)) {\n      /* Quantization tables fetched from file. */\n      if (++argn >= argc)       /* advance to next argument */\n        usage();","sourceCodeStart":433,"sourceCodeEnd":469,"githubUrl":"https://github.com/DrKLO/Telegram/blob/45ab8f4308496e1f01026a97fcdb0d58a5274474/TMessagesProj/jni/mozjpeg/cjpeg.c#L433-L469","documentation":"The -quality switch requires a following argument (a quality rating / scaling factor string). cjpeg finds no token after -quality, prints this message, and calls usage() which exits. The value is saved in qualityarg and parsed later by set_quality_ratings.","triggerScenarios":"Running `cjpeg -quality` with no value following, or as the last token.","commonSituations":"Truncated command line; an empty shell variable for the quality value; scripts that append -quality unconditionally.","solutions":["Supply a quality value, e.g. `cjpeg -quality 80 in.ppm > out.jpg`.","Ensure the variable expanding to the quality string is non-empty."],"exampleFix":"# before\ncjpeg -quality in.ppm > out.jpg\n\n# after\ncjpeg -quality 80 in.ppm > out.jpg","handlingStrategy":"validation","validationCode":"# Ensure -quality has a non-empty numeric value.\ncase \"$QUALITY\" in ''|*[!0-9]*) QUALITY=80 ;; esac\ncjpeg -quality \"$QUALITY\" in.ppm > out.jpg","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always pass a numeric quality value after -quality.","Default an empty quality variable to a sane number."],"tags":["mozjpeg","cjpeg","cli","argument","jpeg"],"backgroundTag":null,"analyzedSha":"45ab8f4308496e1f01026a97fcdb0d58a5274474","analyzedAt":"2026-08-14T05:19:30.815Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}