On 2016-03-06 02:21, Carlos E. R. wrote:
mpeg2dec built and installed successfully (without an rpm, 'make install'). However, "make gopchop" produces C syntax errors with which I'm not familiar:
...
Main.cpp:91:23: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] char *GOPchop_cvsid = "$Id: Main.cpp 346 2009-03-02 23:26:02Z keescook $";
The code section was: char *GOPchop_cvsid = "$Id: Main.cpp 346 2009-03-02 23:26:02Z keescook $"; I change it to: const char *GOPchop_cvsid = "$Id: Main.cpp 346 2009-03-02 23:26:02Z keescook $"; and make is happy on this one after also changing that declaration in the main.h file. The next one, an error, not a warning. Main.cpp:139:1: error: C99 designator ‘video_driver’ outside aggregate initializer }; The code is: global_options options={ run_loop: 0, /* don't wrap arround by default */ run_speed: 1, /* one frame at a time by default */ default_run_speed: 1, /* one frame at a time by default */ auto_refresh: 1, /* show gop position changes by default */ ignore_errors: 0, /* don't ignore errors by default */ drop_orphaned_frames: 0, /* orphaned frame dropping can be nasty */ adjust_timestamps: 1, /* adjust by default */ video_driver_ptr: NULL, /* prefered video driver */ video_driver: "\0", force_system_header: 0, /* force prepended system header pack */ drop_trailing_pack_with_system_header: 0, /* drop final pack if it has a system header */ ignore_endcode: 0, /* don't stop parsing when an End Code is seen */ }; What do I do here? I think it refers to this one: video_driver: "\0", Let me see... the declaration is: typedef struct { gboolean run_loop; /* when in "Run" mode, wrap to beginning at end */ int run_speed; /* how many GOPs to jump forward during "run" */ int default_run_speed; /* the speed to start with upon load */ gboolean auto_refresh; /* redraw the frames after moving the slider */ gboolean ignore_errors; /* don't store errors about file loading */ gboolean drop_orphaned_frames; /* get rid of starting B frames on an open GOP */ gboolean adjust_timestamps; /* adjust the GOP timestamps as we write clips */ gchar* video_driver_ptr; --> gchar video_driver[24]; /* this is the name of the video driver to use */ gboolean force_system_header; /* should a system header be prepended */ gboolean drop_trailing_pack_with_system_header;/* should final pack with a system header be dropped? */ gboolean ignore_endcode; /* should parsing continue past an end code? */ } global_options; I have no idea what to write instead of video_driver: "\0", (that is the remaining hurdle) Next. Main.cpp:152:1: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] }; ^ code is: rc_parse_item parsable_items[] = { { "run_loop", &options.run_loop, RC_TYPE_BOOLEAN }, { "default_run_speed", &options.default_run_speed, RC_TYPE_INTEGER }, { "auto_refresh", &options.auto_refresh, RC_TYPE_BOOLEAN }, { "ignore_errors", &options.ignore_errors, RC_TYPE_BOOLEAN }, { "drop_orphaned_frames", &options.drop_orphaned_frames, RC_TYPE_BOOLEAN }, { "adjust_timestamps", &options.adjust_timestamps, RC_TYPE_BOOLEAN }, { "video_driver_ptr", &options.video_driver_ptr, RC_TYPE_STRING }, { "force_system_header", &options.force_system_header, RC_TYPE_BOOLEAN }, { "drop_trailing_pack_with_system_header", &options.drop_trailing_pack_with_system_header, RC_TYPE_BOOLEAN }, { "ignore_endcode", &options.ignore_endcode, RC_TYPE_BOOLEAN }, { NULL, NULL, 0 } }; main.h: extern rc_parse_item parsable_items[]; rc.h: typedef struct rc_parse_item_t { char * option; /* name of the rc option */ void * variable; /* variable to load into */ int vartype; /* type of option to load */ } rc_parse_item; So I guess I have to change to: const char * option; I make. One error remains: Main.cpp:139:1: error: C99 designator ‘video_driver’ outside aggregate initializer }; ^ (this one is already above, and I don't know what to do about it) Next one is a warning: Main.cpp: In function ‘void handle_rc_load()’: Main.cpp:828:39: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] if (rc_load(PACKAGE,parsable_items)) ^ The code is: typedef struct rc_parse_item_t { const char * option; /* name of the rc option */ void * variable; /* variable to load into */ int vartype; /* type of option to load */ } rc_parse_item; ... int rc_save(char * package, rc_parse_item * items); int rc_load(char * package, rc_parse_item * items); ... rc_parse_item parsable_items[] = { { "run_loop", &options.run_loop, RC_TYPE_BOOLEAN }, { "default_run_speed", &options.default_run_speed, RC_TYPE_INTEGER }, { "auto_refresh", &options.auto_refresh, RC_TYPE_BOOLEAN }, { "ignore_errors", &options.ignore_errors, RC_TYPE_BOOLEAN }, { "drop_orphaned_frames", &options.drop_orphaned_frames, RC_TYPE_BOOLEAN }, { "adjust_timestamps", &options.adjust_timestamps, RC_TYPE_BOOLEAN }, { "video_driver_ptr", &options.video_driver_ptr, RC_TYPE_STRING }, { "force_system_header", &options.force_system_header, RC_TYPE_BOOLEAN }, { "drop_trailing_pack_with_system_header", &options.drop_trailing_pack_with_system_header, RC_TYPE_BOOLEAN }, { "ignore_endcode", &options.ignore_endcode, RC_TYPE_BOOLEAN }, { NULL, NULL, 0 } }; if (rc_load(PACKAGE,parsable_items)) fprintf(stderr,"%s",_("Could not load rc file -- using defaults.\n")); I don't understand why it is giving a warning there :-? -- Cheers / Saludos, Carlos E. R. (from 13.1 x86_64 "Bottle" at Telcontar)