summaryrefslogtreecommitdiff
path: root/Build/source/texk/tex4htk
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2010-11-12 13:50:38 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2010-11-12 13:50:38 +0000
commit3f71d1014254549a8f1411044d64a8990862a673 (patch)
tree398381b52c7dc99ad6cd166d288ee4639e9c2783 /Build/source/texk/tex4htk
parent4c46d8479691310f2eeeda806c3cd7a3d54d9f23 (diff)
tex4htk compiler warning
git-svn-id: svn://tug.org/texlive/trunk@20415 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/tex4htk')
-rw-r--r--Build/source/texk/tex4htk/ChangeLog5
-rw-r--r--Build/source/texk/tex4htk/t4ht.c28
2 files changed, 19 insertions, 14 deletions
diff --git a/Build/source/texk/tex4htk/ChangeLog b/Build/source/texk/tex4htk/ChangeLog
index 6c3940c7380..cd97f1cf545 100644
--- a/Build/source/texk/tex4htk/ChangeLog
+++ b/Build/source/texk/tex4htk/ChangeLog
@@ -1,3 +1,8 @@
+2010-11-12 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * t4ht.c (filterGifScript): Avoid 'filtered_script might be used
+ uninitialized'. Use NULL_SCRIPT.
+
2010-02-23 Peter Breitenlohner <peb@mppmu.mpg.de>
* t4ht.c (get_env_dir0 [WIN32]: Declare as static.
diff --git a/Build/source/texk/tex4htk/t4ht.c b/Build/source/texk/tex4htk/t4ht.c
index 37db830fe66..cb5091404eb 100644
--- a/Build/source/texk/tex4htk/t4ht.c
+++ b/Build/source/texk/tex4htk/t4ht.c
@@ -744,22 +744,22 @@ static struct script_struct * filterGifScript
*old_script,
*new_script;
Q_CHAR *command, *ext;
- if( script == (struct script_struct *) 0 ){
- return (struct script_struct *) 0;
- }
+ filtered_script = NULL_SCRIPT;
+ if( script == NULL_SCRIPT )
+ return filtered_script;
old_script = script;
command = old_script->command;
if( *command != '.' ){
-new_script = (struct script_struct *) 0;
-while( old_script != (struct script_struct *) 0 ){
+new_script = NULL_SCRIPT;
+while( old_script != NULL_SCRIPT ){
command = old_script->command;
if( *command == '.' ){ return filtered_script; }
scr = (struct script_struct *)
m_alloc(struct script_struct, (int) 1);
scr->command = old_script->command;
- scr->next = (struct script_struct *) 0;
- if( new_script == (struct script_struct *) 0 ){
+ scr->next = NULL_SCRIPT;
+ if( new_script == NULL_SCRIPT ){
filtered_script = new_script = scr;
} else {
new_script = new_script->next = scr;
@@ -778,8 +778,8 @@ while( (*ext != '.') && (ext != file) ){ ext--; }
while( TRUE ){
- if( old_script == (struct script_struct *) 0 ){
- return (struct script_struct *) 0;
+ if( old_script == NULL_SCRIPT ){
+ return NULL_SCRIPT;
}
command = old_script->command;
if(*command != '.') {
@@ -792,15 +792,15 @@ while( TRUE ){
}
}
-new_script = (struct script_struct *) 0;
-while( old_script != (struct script_struct *) 0 ){
+new_script = NULL_SCRIPT;
+while( old_script != NULL_SCRIPT ){
command = old_script->command;
if( *command == '.' ){ return filtered_script; }
scr = (struct script_struct *)
m_alloc(struct script_struct, (int) 1);
scr->command = old_script->command;
- scr->next = (struct script_struct *) 0;
- if( new_script == (struct script_struct *) 0 ){
+ scr->next = NULL_SCRIPT;
+ if( new_script == NULL_SCRIPT ){
filtered_script = new_script = scr;
} else {
new_script = new_script->next = scr;
@@ -833,7 +833,7 @@ void free_script
#endif
{
struct script_struct *temp;
- while( script != (struct script_struct *) 0 ){
+ while( script != NULL_SCRIPT ){
temp = script;
script = script->next;
free( temp );