{"record":{"id":"11786a3df82b3e37","repo":"DrKLO/Telegram","slug":"s-missing-argument-for-outfile","errorCode":null,"errorMessage":"%s: missing argument for outfile\n","messagePattern":"(.+?): missing argument for outfile\n","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"TMessagesProj/jni/mozjpeg/cjpeg.c","lineNumber":422,"sourceCode":"        fprintf(stderr, \"%s: missing argument for dc-scan-opt\\n\", progname);\n        usage();\n      }\n      jpeg_c_set_int_param(cinfo, JINT_DC_SCAN_OPT_MODE, atoi(argv[argn]));\n\n    } else if (keymatch(arg, \"optimize\", 1) || keymatch(arg, \"optimise\", 1)) {\n      /* Enable entropy parm optimization. */\n#ifdef ENTROPY_OPT_SUPPORTED\n      cinfo->optimize_coding = TRUE;\n#else\n      fprintf(stderr, \"%s: sorry, entropy optimization was not compiled in\\n\",\n              progname);\n      exit(EXIT_FAILURE);\n#endif\n\n    } else if (keymatch(arg, \"outfile\", 4)) {\n      /* Set output file name. */\n      if (++argn >= argc) {      /* advance to next argument */\n        fprintf(stderr, \"%s: missing argument for outfile\\n\", progname);\n        usage();\n      }\n      outfilename = argv[argn]; /* save it away for later use */\n\n    } else if (keymatch(arg, \"progressive\", 1)) {\n      /* Select simple progressive mode. */\n#ifdef C_PROGRESSIVE_SUPPORTED\n      simple_progressive = TRUE;\n      /* We must postpone execution until num_components is known. */\n#else\n      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)","sourceCodeStart":404,"sourceCodeEnd":440,"githubUrl":"https://github.com/DrKLO/Telegram/blob/45ab8f4308496e1f01026a97fcdb0d58a5274474/TMessagesProj/jni/mozjpeg/cjpeg.c#L404-L440","documentation":"The -outfile switch requires a following argument giving the output file path. cjpeg finds no token after -outfile, prints this message, and calls usage() which exits. (Compare: outfilename is then saved for later use; without it there is no destination.)","triggerScenarios":"Running `cjpeg -outfile` with no path following, or as the last token.","commonSituations":"Truncated command line; an empty shell variable for the output path; redirection-based usage where -outfile was added by mistake.","solutions":["Supply a path: `cjpeg -outfile out.jpg in.ppm`.","Or omit -outfile and use shell redirection (`cjpeg in.ppm > out.jpg`).","Make sure the variable expanding to the path is non-empty."],"exampleFix":"# before\ncjpeg -outfile in.ppm\n\n# after\ncjpeg -outfile out.jpg in.ppm","handlingStrategy":"validation","validationCode":"# Make sure -outfile has a non-empty path, or omit it and use redirection.\nif [ -z \"$OUTFILE\" ]; then\n  cjpeg in.ppm > out.jpg\nelse\n  cjpeg -outfile \"$OUTFILE\" in.ppm\nfi","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Pass a concrete path after -outfile.","Prefer shell redirection when a fixed stdout destination is fine."],"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"}